Date: Mon, 30 Apr 2007 10:39:45 -0700
From: Titus Brown
Cc: quixote-users@mems-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 "", line 1, in
File
"/home/eddie/sys/lib/python2.5/site-packages/quixote/ptl/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/ptl/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
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