Page 1 of 1
Import errors are obsured...
Posted: Fri Jun 28, 2013 11:23 am
by Omega_K2
If you try to do the following:
Load a script
Script imports a lib
lib also imports a nonworking file
You'll just get an ImportError for the first lib, not the others
just a heads up..
Posted: Fri Jun 28, 2013 2:26 pm
by satoon101
Could you give an example so that I can test for this? Please use pastebin to post the example until our syntax bbcode gets fixed.
Thanks for reporting,
Satoon
Posted: Fri Jun 28, 2013 7:34 pm
by Omega_K2
It seems to happen only with non-standard imports in packages (though I got it earlier with standard imports in a package, but I can't seem to replicate it again :S):
test2/test2.py
_libs/mypackage/derp.py
Syntax: Select all
__import__("This is gonna fail")
Error that shows up:
Syntax: Select all
ImportError: cannot import name derp
Posted: Fri Jun 28, 2013 7:54 pm
by satoon101
I'm not sure what to tell you. I assumed that "maybe" the issue was that we remove all lines that have "importlib" in them to reduce the spam within the exception printed. However, I placed some debugging messages prior to that happening, and I still get the exact same result. Maybe, instead of simply using __import__, you should use a try/except and print out (or simply raise) the exception yourself when the import fails. I am a little confused why this is happening, though. I will continue to investigate.
Satoon