Hello, I am trying to write an addon, and in my “init.py” file I have the line “from . import support”, and in the same folder as “init.py” I have a file called “support.py”. When I try to import it this way I get the error “cannot import name ‘support’”. Anyone know why this would be happening? Thanks for any help!
hi, this error usually occurs when you have typo in part of your script.
any of your modules may have the typo.
also check my init here: https://developer.blender.org/diffusion/BA/browse/master/add_mesh_extra_objects/init.py
to make sure your using import correctly.
next check is the py console: Window > toggle system console.
often you can read this & find the culprit.
All the console says is the same “cannot import name ‘support’” error. If I run support.py I have no errors, and if I comment out all the references in init.py to support.py then init runs without an error, but as soon as I uncomment “from . import support” I get the exact same error.
Not exactly sure what I did to fix it because I tried so many things, but it works now.