Addon loading #38219

Closed
opened 2014-01-14 21:26:12 +01:00 by Andrey · 34 comments

System Information
AMD Phenom(tm) II x4 B40 Processor 3.00 GHz
Ram 4.00 GB

Blender Version

2.69.8

Broken: (example: 2.69.7 4b206af, see splash screen)
Worked: (optional)

Short description of error

I am sorry for my English, I hope you will understand me.

When I try to turn on or off any addons the program here gives me such messages.
And this is an attempt to enable or disable any addon.

THE PROGRAM other functions work without problems.

Traceback (most recent call last):

File "C:\Program Files\Blender Foundation\blender-2.69-5611fb6-win64\2.69\scripts\modules\addon_utils.py", line 299, in enable
  mod = __import__(module_name)

ImportError: No module named 'space_view3d_math_vis'

**System Information** AMD Phenom(tm) II x4 B40 Processor 3.00 GHz Ram 4.00 GB **Blender Version** 2.69.8 Broken: (example: 2.69.7 4b206af, see splash screen) Worked: (optional) **Short description of error** I am sorry for my English, I hope you will understand me. When I try to turn on or off any addons the program here gives me such messages. And this is an attempt to enable or disable any addon. THE PROGRAM other functions work without problems. Traceback (most recent call last): ``` File "C:\Program Files\Blender Foundation\blender-2.69-5611fb6-win64\2.69\scripts\modules\addon_utils.py", line 299, in enable mod = __import__(module_name) ``` ImportError: No module named 'space_view3d_math_vis'
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @K_Studio

Added subscriber: @K_Studio

blender/blender#38499 was marked as duplicate of this issue

blender/blender#38499 was marked as duplicate of this issue

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This looks more like a broken build then a bug, is the addon included anywhere in the "scripts" ?

This looks more like a broken build then a bug, is the addon included anywhere in the "scripts" ?
Author

Such problemmy with all the addons that I try to include. If I try to turn off the addon (tick off, deactivate) the program also gives eror and then the addon is not possible to include more.

Yesterday put version 2.64 it works without problems. but if I put 2.69 Problem with addons does not disappear.

Such problemmy with all the addons that I try to include. If I try to turn off the addon (tick off, deactivate) the program also gives eror and then the addon is not possible to include more. Yesterday put version 2.64 it works without problems. but if I put 2.69 Problem with addons does not disappear.

Does this happen with 2.69 release?

Can you check if this problem is specific to the build you downloaded.

Does this happen with 2.69 release? Can you check if this problem is specific to the build you downloaded.
Author

Yes, this problem only in version 2.69 to version 2.64 no such problems.

Now I have two versions.
Because on the disabled addons 2.69 can not convert files to OBJ this can only 2.64.

Version 2.69 downloaded from your official website.

Yes, this problem only in version 2.69 to version 2.64 no such problems. Now I have two versions. Because on the disabled addons 2.69 can not convert files to OBJ this can only 2.64. Version 2.69 downloaded from your official website.

@K_Studio: Did you test with the 2.69 release downloaded from blender.org? (4b206af is not a release)

@K_Studio: Did you test with the 2.69 release downloaded from blender.org? (4b206af is not a release)
Author

Yes.

Yes.

Added subscriber: @Sergey

Added subscriber: @Sergey

Couldn't reproduce the issue with neither official 2.69 release nor current development builds.

@K_Studio please try downloading latest build from http://builder.blender.org/download/ and provide us exact stesp how you reproduce the issue, starting from how/where you unpack the archive.

It might also be permission issue, so try unpacking to locations different from c:\program files

Couldn't reproduce the issue with neither official 2.69 release nor current development builds. @K_Studio please try downloading latest build from http://builder.blender.org/download/ and provide us exact stesp how you reproduce the issue, starting from how/where you unpack the archive. It might also be permission issue, so try unpacking to locations different from `c:\program files`

Added subscriber: @Happiness

Added subscriber: @Happiness

◀ Merged tasks: blender/blender#38499.

◀ Merged tasks: blender/blender#38499.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2014-02-17 10:51:16 +01:00

@K_Studio, no response in more than a week. Due to policy of this bug tracker archiving the report now.

Please try using fresh builds from builder.blender.org and make sure they're properly unpacked. If it fails again poke me here with detailed info provided and i'll re-open the report.

@K_Studio, no response in more than a week. Due to policy of this bug tracker archiving the report now. Please try using fresh builds from builder.blender.org and make sure they're properly unpacked. If it fails again poke me here with detailed info provided and i'll re-open the report.

Added subscriber: @DominikR

Added subscriber: @DominikR

Can confirm the problem on official 2.70win32, affecting various addons.
OS is WinXP, using the portable .zip-version, unpacked to different location than C:\Program Files.
Please let me know if any more informations are needed.

Can confirm the problem on official 2.70win32, affecting various addons. OS is WinXP, using the portable .zip-version, unpacked to different location than C:\Program Files\. Please let me know if any more informations are needed.

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

Reopening
@DominikR since we cant redo the error, you may have to troubleshoot.

Try:

  • search your entire hard disk for "space_view3d_math_vis", "blender.exe"
  • remove ALL blender installations (so files above shouldn't exist)
  • unpack the blender zipfile to a very simple path with "c:\b" for example.
  • see if the bug still occurs.
Reopening @DominikR since we cant redo the error, you may have to troubleshoot. Try: - search your entire hard disk for "space_view3d_math_vis", "blender.exe" - remove ALL blender installations (so files above shouldn't exist) - unpack the blender zipfile to a very simple path with "c:\b" for example. - see if the bug still occurs.

@ideasman42 I followed the steps, and it worked - once. The second script produced the message described above, as I tried to activate it.

A few days ago I achieved a similar effect, forgot to mention that in first place: An IRC user recommended to rename my %appdata%/../2.70- folder, and then not pick "copy previous settings" on next start. With the fresh created new settings folder, I had the similar effect of being able to install&activate one external script.

Just to clarify: All the addons shipped with blender can be activated fine. Problems just arise from self-downloaded ones.
Also, I am always using the "install script from file" button and point it to a .py or a .zip.
The installationpath I picked was "C:\Portable".

@ideasman42 I followed the steps, and it worked - once. The second script produced the message described above, as I tried to activate it. A few days ago I achieved a similar effect, forgot to mention that in first place: An IRC user recommended to rename my %appdata%/../2.70- folder, and then not pick "copy previous settings" on next start. With the fresh created new settings folder, I had the similar effect of being able to install&activate one external script. Just to clarify: All the addons shipped with blender can be activated fine. Problems just arise from self-downloaded ones. Also, I am always using the "install script from file" button and point it to a .py or a .zip. The installationpath I picked was "C:\Portable".

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

@DominikR - glad you managed to get this working.

closing.

@DominikR - glad you managed to get this working. closing.

I found an even simpler solution, if it helps someone in future:

1.Install script
2.Activate (doesnt work, gives error)
3.Close & reopen blender
4.Search script again in user settings, activate again - now it should work.

If you want several scripts as once, batch the process - first install all of them, 1x close&reopen, then activate all of them, works too.

Thanks @ideasman42!

I found an even simpler solution, if it helps someone in future: 1.Install script 2.Activate (doesnt work, gives error) 3.Close & reopen blender 4.Search script again in user settings, activate again - now it should work. If you want several scripts as once, batch the process - first install all of them, 1x close&reopen, then activate all of them, works too. Thanks @ideasman42!

@DominikR

Can you please let us know what the error is, Run blender with the console before installing a script and copy&paste the entire message here. or attach a text file if its large.

Activate should work first time, if not - then its a bug, but you dont give us any information as to what fails.

@DominikR Can you please let us know what the error is, Run blender with the console before installing a script and copy&paste the entire message here. or attach a text file if its large. Activate should work first time, if not - then its a bug, but you dont give us any information as to what fails.

It is pretty much the message the OP quoted at end of his first post. I add 2 screenshots:
userpref.png

console.png

Edit: 3rd one, the console after restarting, going to userprefs, finding addon, activate it successful:
console_success.png

It is pretty much the message the OP quoted at end of his first post. I add 2 screenshots: ![userpref.png](https://archive.blender.org/developer/F83635/userpref.png) ![console.png](https://archive.blender.org/developer/F83637/console.png) Edit: 3rd one, the console after restarting, going to userprefs, finding addon, activate it successful: ![console_success.png](https://archive.blender.org/developer/F83639/console_success.png)

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

Thanks, have an idea for why this might happen. will investigate.

Thanks, have an idea for why this might happen. will investigate.

note: release/scripts/modules/bpy/utils.py, refresh_script_paths is supposed to make sure the addon can be imported after installing.

It looks like this isn't working in some cases.

note: `release/scripts/modules/bpy/utils.py`, `refresh_script_paths` is supposed to make sure the addon can be imported after installing. It looks like this isn't working in some cases.
Sergey Sharybin removed their assignment 2014-04-01 12:40:21 +02:00
Campbell Barton was assigned by Sergey Sharybin 2014-05-19 17:43:36 +02:00

Just tried on windows7, and I can't redo this bug.

I can't see why refresh_script_paths would fail, afraid I would have to use a system with this problem to be able to investigate the bug.

If someone likes to debug, This is whats happening:

  • User installs addon: WM_OT_addon_install (from wm.py)
  • WM_OT_addon_install creates the target directory (if it doesn't exist)
  • After the file is copied bpy.utils.refresh_script_paths() is called to ensure any newly created addons paths are in sys.path.

To debug this I would try print this before and after installing the script.

   print("Addon Paths:", __import__("addon_utils").paths())
   print("Sys Paths:", __import__("sys").path)

Heres a diff:

    diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
    index 86ae8fd..faa5d10 100644
      - a/release/scripts/startup/bl_operators/wm.py
    +++ b/release/scripts/startup/bl_operators/wm.py
    @@ -1846,6 +1846,9 @@ class WM_OT_addon_install(Operator):
             import shutil
             import os
     
    +        print("Addon Paths:", __import__("addon_utils").paths())
    +        print("Sys Paths:", __import__("sys").path)
    +
             pyfile = self.filepath
     
             if self.target == 'DEFAULT':
    @@ -1945,6 +1948,9 @@ class WM_OT_addon_install(Operator):
           # in case a new module path was created to install this addon.
             bpy.utils.refresh_script_paths()
     
    +        print("Addon Paths:", __import__("addon_utils").paths())
    +        print("Sys Paths:", __import__("sys").path)
    +
           # print message
             msg = tip_("Modules Installed from %r into %r (%s)") % (pyfile, path_addons, ", ".join(sorted(addons_new)))
             print(msg)

@K_Studio

Could you apply these changes to your wm.py, install an addon (get the output), then install it again after restarting blender?

Just tried on windows7, and I can't redo this bug. I can't see why `refresh_script_paths` would fail, afraid I would have to use a system with this problem to be able to investigate the bug. If someone likes to debug, This is whats happening: - User installs addon: WM_OT_addon_install (from wm.py) - WM_OT_addon_install creates the target directory (if it doesn't exist) - After the file is copied `bpy.utils.refresh_script_paths()` is called to ensure any newly created addons paths are in `sys.path`. To debug this I would try print this before and after installing the script. ``` print("Addon Paths:", __import__("addon_utils").paths()) print("Sys Paths:", __import__("sys").path) ``` Heres a diff: ``` diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 86ae8fd..faa5d10 100644 ``` - a/release/scripts/startup/bl_operators/wm.py ``` +++ b/release/scripts/startup/bl_operators/wm.py @@ -1846,6 +1846,9 @@ class WM_OT_addon_install(Operator): import shutil import os + print("Addon Paths:", __import__("addon_utils").paths()) + print("Sys Paths:", __import__("sys").path) + pyfile = self.filepath if self.target == 'DEFAULT': @@ -1945,6 +1948,9 @@ class WM_OT_addon_install(Operator): ``` # in case a new module path was created to install this addon. ``` bpy.utils.refresh_script_paths() + print("Addon Paths:", __import__("addon_utils").paths()) + print("Sys Paths:", __import__("sys").path) + ``` # print message ``` msg = tip_("Modules Installed from %r into %r (%s)") % (pyfile, path_addons, ", ".join(sorted(addons_new))) print(msg) ``` @K_Studio Could you apply these changes to your `wm.py`, install an addon (get the output), then install it again after restarting blender?
Member

Added subscriber: @MartijnBerger

Added subscriber: @MartijnBerger
Member

@ideasman42 should we close this at some point due to lack of feedback ?

@ideasman42 should we close this at some point due to lack of feedback ?

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Guess so, would be good to get to bottom of it, especially since another user had same bug.

Will archive for now, post on duplicate asking for feedback.

Guess so, would be good to get to bottom of it, especially since another user had same bug. Will archive for now, post on duplicate asking for feedback.
Sign in to join this conversation.
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#38219
No description provided.