durusmail: quixote-users: Re: Quixote (0.7a3) ihook error when importing sqlobject 0.6
Quixote (0.7a3) ihook error when importing sqlobject 0.6
2004-03-29
Re: Quixote (0.7a3) ihook error when importing sqlobject 0.6
2004-03-30
Re: Quixote (0.7a3) ihook error when importing sqlobject 0.6
Samir Patel
2004-03-30
Found problem. I need to do "from sqlobect import *" before enable_ptl().
- Samir

On Monday 29 March 2004 03:17 pm, Samir Patel wrote:
> This is very strange error. I was running quixote application with
> sqlobject 0.5.2 which works great on both windows and linux. I then
> downloaded svn version of sqlobject (0.6), modify my application and it run
> perfect under linux. However when I try to run same application under
> windows, it cannot import sqlobject.
>
> I trace back problem and it boils down to importing sqlobject. If I comment
> out "from sqlobject import *" from __init__.py file, it runs fine otherwise
> it throws following error. If I run it outside of quixote, it runs fine
> (And as I said before it runs fine in  linux).
>
> ***************************************************************************
>*******************
>
> Traceback (most recent call last):
>   File
> "C:Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
> line 310, in RunScript
>     exec codeObject in __main__.__dict__
>   File "C:\Python23\Lib\site-packages\motor\motorService.py", line 20, in ?
>     publisher = Publisher('motor')
>   File "C:\Python23\lib\site-packages\quixote\publish.py", line 106, in
> __init__
>     self.root_namespace = _get_module(root_namespace)
>   File "C:\Python23\lib\site-packages\quixote\publish.py", line 32, in
> _get_module
>     __import__(name)
>   File "C:\Python23\Lib\ihooks.py", line 398, in import_module
>     q, tail = self.find_head_package(parent, str(name))
>   File "C:\Python23\Lib\ihooks.py", line 434, in find_head_package
>     q = self.import_it(head, qname, parent)
>   File "C:\Python23\Lib\ihooks.py", line 489, in import_it
>     m = self.loader.load_module(fqname, stuff)
>   File "C:\Python23\lib\site-packages\quixote\ptl_import.py", line 111, in
> load_module
>     return ihooks.ModuleLoader.load_module( self, name, stuff)
>   File "C:\Python23\Lib\ihooks.py", line 274, in load_module
>     m = self.hooks.load_package(name, filename, file)
>   File "C:\Python23\Lib\ihooks.py", line 174, in load_package
>     return imp.load_module(name, file, filename, ("", "", PKG_DIRECTORY))
>   File "C:\Python23\lib\site-packages\motor\__init__.py", line 3, in ?
>     from sqlobject import *
>   File "C:\Python23\Lib\ihooks.py", line 398, in import_module
>     q, tail = self.find_head_package(parent, str(name))
>   File "C:\Python23\Lib\ihooks.py", line 439, in find_head_package
>     q = self.import_it(head, qname, parent)
>   File "C:\Python23\Lib\ihooks.py", line 489, in import_it
>     m = self.loader.load_module(fqname, stuff)
>   File "C:\Python23\lib\site-packages\quixote\ptl_import.py", line 111, in
> load_module
>     return ihooks.ModuleLoader.load_module( self, name, stuff)
>   File "C:\Python23\Lib\ihooks.py", line 274, in load_module
>     m = self.hooks.load_package(name, filename, file)
>   File "C:\Python23\Lib\ihooks.py", line 174, in load_package
>     return imp.load_module(name, file, filename, ("", "", PKG_DIRECTORY))
>   File "/usr/lib/python2.3/site-packages/sqlobject/__init__.py", line 7, in
> ? ImportError: cannot import name connectionForURI



reply