[Z3-sqlos] add and sqlmeta errors

Brian Sutherland jinty at web.de
Thu Mar 30 17:42:48 CEST 2006


On Thu, Mar 30, 2006 at 05:20:20PM +0200, Stéphane Brault wrote:
> The preceding post was a bit hard to read, my mistake
> ;-). Here is a more readable version :
> 
>  Hi,
>  I'm using sqlos for a zope 3 project using an
>  existing
>  mysql database. Following the tutorial, I was able
>  to
>  create a table object as well as a container. I also
>  had to add a sqlmeta class. Everything works fine
>  except : 
>  - when I try to add an object, I get the following
>  error : 
>  TypeError: Categories() did not get expected keyword
>  argument CategoryID
>  I must say that the CategoryID is in the form and is
>  declared in the class.

I've seen this before and believe it is more an issue with SQLObject
rather than SQLOS. There may be a better response from the SQLObject
docs or list.

I seem to remember that SQLObject is very picky with what the names of
attributes and columns are. This is especially a problem when you try to
use an existing database.

>  - When I copy paste an object, I get :
>  PicklingError: Can't pickle <class 
> 'sqlobject.declarative.sqlmeta'>: attribute lookup
>  sqlobject.declarative.sqlmeta failed.

Are you inheriting from SQLOS and Persistent, or pasting into a
persistent container?? Because zope is trying to put your SQLObject into
the ZODB...

Please bear in mind that SQLOS still doesn't work very well through the
ZMI. People have generally been using it for projects where they replace
the ZMI completely.

> 
> Any hint ?
> 
> Thanks,
> 
> Stéphane
> 
> 
> 	
> 
> 	
> 		
> ___________________________________________________________________________ 
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez sur http://fr.messenger.yahoo.com
> _______________________________________________
> z3-sqlos mailing list
> z3-sqlos at codespeak.net
> http://codespeak.net/mailman/listinfo/z3-sqlos
> 

-- 
Brian Sutherland

Metropolis - "it's the first movie with a robot. And she's a woman.
              And she's EVIL!!"



More information about the z3-sqlos mailing list