[Z3-sqlos] add and sqlmeta errors

Stéphane Brault stephane_brault at yahoo.fr
Thu Mar 30 18:05:43 CEST 2006


Thanks Brian,

--- Brian Sutherland <jinty at web.de> a écrit :

> 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.
>

That is why I declared a sqlmeta class in my class,
the problem only arises with one field, which is
strange. It doesn't have any problem when retrieving
the rows or updating.
 
> >  - 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.
> 

I know this might be asked elsewhere, but is it easy
to replace the ZMI ?

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!!"
> 



	

	
		
___________________________________________________________________________ 
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



More information about the z3-sqlos mailing list