On Thu, 2004-05-06 at 19:37, Michael Palmer wrote:
> (www.biopython.org). If I include the line
> from Bio import GenBank
> I get the error
> File "C:\PYTHON23\lib\ihooks.py", line 470, in ensure_fromlist
> raise ImportError, "No module named " + subname
> ImportError: No module named Bio.config.Bio
> (full traceback below).
> Bio.config exists, whereas Bio.config.Bio indeed does not. The import
> works fine from the command line, i.e. if Webware and or the standard
> lib ihooks module used by it are not involved. I'm not sure whether
> to
> blame Webware or ihooks. If someone having a more solid understanding
> of
> Python's nuts and bolts than myself could figure that out, this would
> be
> much appreciated. Thanks, Michael
> File "C:\PYTHON23\Lib\site-packages\Bio\__init__.py", line 106, in
> ?
> _load_registries()
> File "C:\PYTHON23\Lib\site-packages\Bio\__init__.py", line 83, in
> _load_registries
> config_imports = __import__("Bio.config", {}, {}, ["Bio"])
> File "C:\PYTHON23\lib\ihooks.py", line 403, in import_module
> self.ensure_fromlist(m, fromlist)
> File "C:\PYTHON23\lib\ihooks.py", line 470, in ensure_fromlist
> raise ImportError, "No module named " + subname
> ImportError: No module named Bio.config.Bio
>From the traceback, it looks like that fancy stuff Bio is trying to do in
it's __init__ (i.e. calling __import__ directly) is incompatible with ihooks.
I don't believe that the problem lies with Webware, except in that Webware
relies on ihooks. If you can reduce this to a test case (i.e. a couple of
files) which work in standard python but not when ihooks has been enabled,
then it would be good to file a bug against ihooks (in the python standard
library).
peace,
Jason
--
Jason D. Hildebrand
[EMAIL PROTECTED]
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss