Page MenuHome

User Preferences > Addons bugs
Closed, ArchivedPublic

Description

I'm having problems with the Addons panel.

--- Operating System, Graphics card ---
Win7 64x, Nvidia Quadro 4k

--- Blender version with error, and version that worked ---
blender-2.69-RC3-windows64 (Different error in 2.68 final).

--- Short description of error ---
Trying to refresh addon list causes an exception.
Trying to load an addon from file causes an exception.
Trying to refresh addon list in 2.68 causes entire Addon panel to be blank, persists on restart.

--- Steps for others to reproduce the error (preferably based on attached .blend file) ---
Open 'User Preferences' > 'Addons'
press 'Refresh' button.

Event Timeline

It looks like it is the importer I'm writing that causes the error.
Running Blender 2.68a Win64 from the commandline shows that the addon window is throwing the parsing error on my script.
When run from the script window it works correctly (registers itself with a menu item which successfully runs the script).
I've run my script through 2to3 and it doesn't find anything to change...

I can't get the bug-tracker attachment thing to work.
Here is a gist containing the script I'm writing:
https://gist.github.com/kitsu/e2616b8530b295afac11

This has nothing to do in a bug tracker! If you want help for your script, please ask on bf-python mailing list, or on IRC (#blenderpython), or on a forum like blenderartists.org…

Bastien Montagne (mont29) changed the task status from Unknown Status to Archived.Oct 23 2013, 9:39 PM

I figured it out no thanks to you.
In scripts/modules/addon_utils.py you use the ast module to scan my module and find the bl_info block. Then taking that code out of context you evaluate the dictionary.
In my code I referenced my modules docstring __doc__ for the bl_info['description'], a variable that doesn't exist when the dict is evaluated out of context!

My suggested change is to fix the exception text:
scripts/modules/addon_utils.py line 132
- print("AST error in module %s" % mod_name)
+ print("AST error parsing bl_info for %s" % mod_name)