Kupfer preferences bail out

Bug #544289 reported by Chmouel Boudjnah
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kupfer
Fix Released
Undecided
Unassigned

Bug Description

I am not sure if it is my config but when trying to access kupfer preferences i get this traceback :

Traceback (most recent call last):
  File "/home/chmouel/GIT/oss/kupfer/kupfer/ui/browser.py", line 1305, in _activate
    self.data_controller.activate()
  File "/home/chmouel/GIT/oss/kupfer/kupfer/core/data.py", line 743, in activate
    res, ret = ctx.run(leaf, action, sobject)
  File "/home/chmouel/GIT/oss/kupfer/kupfer/commandexec.py", line 190, in run
    ret = activate_action(obj, action, iobj)
  File "/home/chmouel/GIT/oss/kupfer/kupfer/commandexec.py", line 70, in activate_action
    return _activate_action_single(obj, action, iobj)
  File "/home/chmouel/GIT/oss/kupfer/kupfer/commandexec.py", line 78, in _activate_action_single
    ret = action.activate(obj)
  File "/home/chmouel/GIT/oss/kupfer/kupfer/obj/objects.py", line 371, in activate
    return leaf.run()
  File "/home/chmouel/GIT/oss/kupfer/kupfer/plugin/core/contents.py", line 77, in run
    kupferui.show_preferences()
  File "/home/chmouel/GIT/oss/kupfer/kupfer/kupferui.py", line 52, in show_preferences
    win = preferences.GetPreferencesWindowController()
  File "/home/chmouel/GIT/oss/kupfer/kupfer/ui/preferences.py", line 626, in GetPreferencesWindowController
    _preferences_window = PreferencesWindowController()
  File "/home/chmouel/GIT/oss/kupfer/kupfer/ui/preferences.py", line 97, in __init__
    key= lambda rec: rec["localized_name"])
  File "/home/chmouel/GIT/oss/kupfer/kupfer/utils.py", line 67, in locale_sort
    seq = seq if isinstance(seq, list) else list(seq)
  File "/home/chmouel/GIT/oss/kupfer/kupfer/core/plugins.py", line 59, in get_plugin_info
    plugin = import_plugin_any(plugin_name)
  File "/home/chmouel/GIT/oss/kupfer/kupfer/core/plugins.py", line 266, in import_plugin_any
    return _staged_import(name, _import_hook_fake)
  File "/home/chmouel/GIT/oss/kupfer/kupfer/core/plugins.py", line 243, in _staged_import
    plugin = import_hook(_plugin_path(name))
  File "/home/chmouel/GIT/oss/kupfer/kupfer/core/plugins.py", line 197, in _import_hook_fake
    return _import_plugin_fake(modpath)
  File "/home/chmouel/GIT/oss/kupfer/kupfer/core/plugins.py", line 186, in _import_plugin_fake
    code = _truncate_code(loader.get_code(modpath), info_attributes)
  File "/home/chmouel/GIT/oss/kupfer/kupfer/core/plugins.py", line 127, in _truncate_code
    none_index = list(code.co_consts).index(None)
AttributeError: 'NoneType' object has no attribute 'co_consts'

Let me know if you need further info....

Chmouel.

Revision history for this message
X (u78qir8a9-deactivatedaccount) wrote :

This is a Kupfer bug, thanks for reporting this. I think I have seen this and it is caused by a .pyc (or .pyo) file from the wrong Python version in any of your Kupfer plugin directories. Kupfer should be fixed to not bail out at this point, of course, but a safe fix is removing stale .pyc files until then (if my guess is correct).

Changed in kupfer:
status: New → Confirmed
assignee: nobody → Ulrik Sverdrup (ulrik-sverdrup)
Changed in kupfer:
status: Confirmed → Fix Committed
Revision history for this message
Chmouel Boudjnah (chmouel) wrote :

You are right, I had to cleanup my pyc.

Cheers.

Changed in kupfer:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.