List Info

Thread: Re: enable_ptl/easy_install problem




Re: enable_ptl/easy_install problem
country flaguser name
United Kingdom
2007-04-30 13:22:26
   Date: Mon, 30 Apr 2007 10:39:45 -0700
   From: Titus Brown <tituscaltech.edu>
   Cc: quixote-usersmems-exchange.org
   X-Spam-Level: 
   X-Scanned-By: MIMEDefang 2.52 on 129.215.13.80

   On Mon, Apr 30, 2007 at 06:21:00PM +0100, Eddie Corns
wrote:
   -> 

   Try

   import pkg_resources
   pkg_resources.require('Quixote')

   first.  I've been happily mixing old and new versions of
Quixote with
   easy_install for about a year; maybe you need to do an
explicit
   'require'?

   cheers,
   --titus

Thanks for the reply but that doesn't help.  I will need to
read more about
the pkg_resources stuff tomorrow but I suspect that's not
where the problem
lies.  I didn't include a stack trace before because I
thought I was being
smart with the minimal demo and plus it doesn't always
happen at quite the
same place but here is one sample:

>>> import pkg_resources
>>> pkg_resources.require('Quixote')
[Quixote 2.5b1
(/home/eddie/sys/lib/python2.5/site-packages)]
>>> from quixote import enable_ptl
>>> enable_ptl()
>>> from defs import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/home/eddie/sys/lib/python2.5/site-packages/quixote/pt
l/ptl_import.py", line
116, in find_import_module
    return self.loader.load_module(fullname, stuff)
  File
"/home/eddie/sys/lib/python2.5/site-packages/quixote/pt
l/ptl_import.py", line
100, in load_module
    return ihooks.ModuleLoader.load_module(self, name,
stuff)
  File "/home/eddie/sys/lib/python2.5/ihooks.py",
line 270, in load_module
    m = self.hooks.load_source(name, filename, file)
  File "/home/eddie/sys/lib/python2.5/ihooks.py",
line 168, in load_source
    return imp.load_source(name, filename, file)
  File "/home/eddie/dev/netjobs/defs.py", line 32,
in <module>
    connection = connectionForURI(constr)
  File
"/home/eddie/sys/lib/python2.5/site-packages/SQLObject-
0.8.2-py2.5.egg/sqlobject/dbconnection.py",
line 1051, in connectionForURI
    conn =
self.schemeBuilders[scheme]().connectionFromURI(uri)
  File
"/home/eddie/sys/lib/python2.5/site-packages/SQLObject-
0.8.2-py2.5.egg/sqlobject/mysql/mysqlconnection.py",
line 56, in connectionFromURI
    host=host or 'localhost', port=port or 0, **args)
  File
"/home/eddie/sys/lib/python2.5/site-packages/SQLObject-
0.8.2-py2.5.egg/sqlobject/mysql/mysqlconnection.py",
line 23, in __init__
    import MySQLdb, MySQLdb.constants.CR,
MySQLdb.constants.ER
ImportError: No module named MySQLdb

(without the impotr pkg_resources the first import to fail
is pkg_resources
itself!) 

Actually, on reflection, I still think the munepy example
shows that there is
something seriously wrong with (at least my setup of)
quixote import.

Eddie
_______________________________________________
Quixote-users mailing list
Quixote-usersmems-exchange.org
http://mail.mems-exchange.org/mailman/listinfo/quixo
te-users

Re: enable_ptl/easy_install problem
user name
2007-04-30 14:02:08
Eddie --

Could this be the old PTL vs SQLObject import problem? 
See:

  http://mail.mems-exchange.org/durusmail/quixote-users
/3639/

I believe changing the import order and/or delaying the call
to
enable_ptl is a workaround.

   -Roger

Eddie Corns writes:
 > Thanks for the reply but that doesn't help.  I will
need to read more about
 > the pkg_resources stuff tomorrow but I suspect that's
not where the problem
 > lies.  I didn't include a stack trace before because I
thought I was being
 > smart with the minimal demo and plus it doesn't always
happen at quite the
 > same place but here is one sample:
 > 
 > >>> import pkg_resources
 > >>> pkg_resources.require('Quixote')
 > [Quixote 2.5b1
(/home/eddie/sys/lib/python2.5/site-packages)]
 > >>> from quixote import enable_ptl
 > >>> enable_ptl()
 > >>> from defs import *
 > Traceback (most recent call last):
 >   File "<stdin>", line 1, in
<module>
 >   File
 >
"/home/eddie/sys/lib/python2.5/site-packages/quixote/pt
l/ptl_import.py", line
 > 116, in find_import_module
 >     return self.loader.load_module(fullname, stuff)
 >   File
 >
"/home/eddie/sys/lib/python2.5/site-packages/quixote/pt
l/ptl_import.py", line
 > 100, in load_module
 >     return ihooks.ModuleLoader.load_module(self, name,
stuff)
 >   File
"/home/eddie/sys/lib/python2.5/ihooks.py", line
270, in load_module
 >     m = self.hooks.load_source(name, filename, file)
 >   File
"/home/eddie/sys/lib/python2.5/ihooks.py", line
168, in load_source
 >     return imp.load_source(name, filename, file)
 >   File "/home/eddie/dev/netjobs/defs.py",
line 32, in <module>
 >     connection = connectionForURI(constr)
 >   File
 >
"/home/eddie/sys/lib/python2.5/site-packages/SQLObject-
0.8.2-py2.5.egg/sqlobject/dbconnection.py",
 > line 1051, in connectionForURI

_______________________________________________
Quixote-users mailing list
Quixote-usersmems-exchange.org
http://mail.mems-exchange.org/mailman/listinfo/quixo
te-users

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )