Gadfly DB problem in python

Andy Todd andy_todd at yahoo.com
Tue Mar 11 09:48:11 EST 2003


"Lance LaDamage" <lance-ladamage at rogers.com> wrote in message news:<mxP9a.60034$em1.5747 at news04.bloor.is.net.cable.rogers.com>...
> This is the traceback I get:
> 
> C:\DATA\RY>main.py
> Traceback (most recent call last):
>   File "C:\DATA\RY\main.py", line 27, in ?
>     DataPool.Startup( connection = connection )
>   File "C:\Data\Ry\DataPool.py", line 35, in Startup
>     DataPool.instance = DataPool( init[ 'connection' ] )
>   File "C:\Data\Ry\DataPool.py", line 24, in __init__
>     self.cursor.execute("select * from datapool")
>   File "F:\Python22\Lib\site-packages\gadfly\database.py", line 372, in
> execute
>   File "C:\Data\Python\lib\site-packages\gadfly\gadfly\semantics.py", line
> 2719,
>  in eval
>     substseq = h.join(substseq)
>   File "C:\Data\Python\lib\site-packages\gadfly\gadfly\semantics.py", line
> 149,
> in join
>     new = t.remap(transformG)
>   File "F:\Python22\Lib\site-packages\gadfly\kjbuckets0.py", line 581, in
> remap
>   File "C:\Data\Python\lib\site-packages\gadfly\gadfly\kjbuckets0.py", line
> 413,
>  in __mul__
>     raise ValueError, "kjGraph composes only with kjTable"
> ValueError: kjGraph composes only with kjTable
> 
[snip code example]
> 
> 
> All this code is fine but it used to work on my old computer, but now it
> won't work on this one...


Lance,

You haven't posted the code that actually causes the error to be
raised;

>   File "C:\Data\Ry\DataPool.py", line 24, in __init__
>     self.cursor.execute("select * from datapool")

Which I believe is your obfuscated database access routine.

Nevertheless I am going to start guessing. You said that this stopped
working when you ported the code to your new machine. Did you copy the
gadfly database files as well? Not copying the database files (they
end in .gfd and .grl) is a possible cause of your error.

If this isn't the case then I would suggest reducing the code to a
nice simple example which illustrates your error. It will make finding
the source of it much easier.

To get to this position I would suggest that you try importing the
DataPool module in an interactive session and examining what happens
when you create objects from it and invoke their methods.

HTH,
Andy




More information about the Python-list mailing list