Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named 'animation_delicode_ni_mate_tools_2' #7

Closed
snovak opened this issue Aug 8, 2019 · 3 comments

Comments

@snovak
Copy link

commented Aug 8, 2019

Hey there, I'm trying to install the addon for Blender 2.79, but on import I'm getting an error...

Modules Installed (animation_delicode_ni_mate_tools_2.79) from 'C:\Users\snovak\Downloads\animation_delicode_ni_mate_tools_2.79.py' into 'C:\Users\snovak\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons'
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender\2.79\2.79\scripts\modules\addon_utils.py", line 331, in enable
mod = import(module_name)
ImportError: No module named 'animation_delicode_ni_mate_tools_2'

I suspect that the "_2" is being appended by the installer trying to compensate for a previous installation? I see "animation_delicode_ni_mate_tools_2" no where in the script. However, I see "animation_delicode_ni_mate_tools" quite a bit.

Things I've tried so far....

  • Deleted all leftover potential conflicts in C:\Users\snovak\AppData\Roaming\Blender Foundation\Blender
  • Deleted all leftover potential conflicts in C:\Program Files\Blender Foundation\Blender\2.79

...still no go.

@snovak

This comment has been minimized.

Copy link
Author

commented Aug 8, 2019

.. so I've realized that the ..."_2" comes from the file name. But, even if I rename the py file animation_delicode_ni_mate_tools.2.79.py, with a "." instead of a "_", I still get the error

ImportError: No module named 'animation_delicode_ni_mate_tools'

@SirDifferential

This comment has been minimized.

Copy link
Contributor

commented Aug 9, 2019

Fixed by removing the period in the filename. I didn't realize Blender cared what the files are called. Good catch!

EDIT: It seems this is a thing in Python, not Blender. You can't have a dot in a filename that's imported as a module.

@snovak

This comment has been minimized.

Copy link
Author

commented Aug 9, 2019

Great! Fortunately this forced me to get moving with Blender 2.8, which is working. Thanks for the great software!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.