It looks like the objects that had failed to
instantiate, are still linger in the session
somewhere?

Example: (ConfigNode is a renamed TreeNode from
basic_tree.py)

I try to create instance, and it fails:

>>> c = ConfigNode()
Traceback (most recent call last):
  File "<console>", line 1, in ?
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/mapper.py",
line 416, in init
TypeError: __init__() takes exactly 2 arguments (1
given)


Then I try to flush the session:

>>> objectstore.flush()
Traceback (most recent call last):
  File "<console>", line 1, in ?
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/session.py",
line 233, in flush
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/unitofwork.py",
line 252, in flush
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/unitofwork.py",
line 420, in execute
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/unitofwork.py",
line 689, in execute
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/unitofwork.py",
line 697, in execute
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/unitofwork.py",
line 677, in _execute_per_element_childtasks
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/unitofwork.py",
line 695, in execute
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/unitofwork.py",
line 645, in _save_objects
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/orm/mapper.py",
line 661, in save_obj
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/engine/base.py",
line 240, in execute
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/engine/base.py",
line 264, in execute_clauseelement
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/engine/base.py",
line 280, in execute_compiled
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/engine/base.py",
line 276, in proxy
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/engine/base.py",
line 315, in _execute_raw
  File
"build/bdist.freebsd-6.0-RELEASE-i386/egg/sqlalchemy/engine/base.py",
line 334, in _execute
SQLError: (OperationalError) (1048, "Column
'node_name' cannot be null") 'INSERT INTO config
(parent_node_id, node_name, attributes) VALUES (%s,
%s, %s)' [None, None, None]

Why does it try to do insert at all?


Regards,
Anton

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to