Well seems like the project you want to access is just None. SA can't do anything with it. I had a similar problem recently, it was bacause the objects got garbage collected before being accessed. A testcase would be really helpful.

On Sat, 27 Mar 2010 17:42:20 +0100, Fernando Takai <fernando.ta...@gmail.com> wrote:

Hi all!

I'm running SQLAlchemy 0.6b2 for a while and i've seem some strange
exception (AttributeError: 'NoneType' object has no attribute
'_sa_iterator') happening one in a while.
This is my stacktrace:

Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "./db/models/job.py", line 109, in run
    func(self)
  File "./queue/queue.py", line 284, in job_finished
    job = session.merge(job)
File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.6beta2-py2.5-linux-x86_64.egg/sqlalchemy/orm/session.py",
line 1126, in merge
    load=load, _recursive=_recursive)
File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.6beta2-py2.5-linux-x86_64.egg/sqlalchemy/orm/session.py",
line 1188, in _merge
    prop.merge(self, state, state_dict, merged_state, merged_dict,
load, _recursive)
File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.6beta2-py2.5-linux-x86_64.egg/sqlalchemy/orm/properties.py",
line 681, in merge
    obj = session._merge(current_state, current_dict, load=load,
_recursive=_recursive)
File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.6beta2-py2.5-linux-x86_64.egg/sqlalchemy/orm/session.py",
line 1188, in _merge
    prop.merge(self, state, state_dict, merged_state, merged_dict,
load, _recursive)
File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.6beta2-py2.5-linux-x86_64.egg/sqlalchemy/orm/properties.py",
line 661, in merge
    for current in instances:
File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.6beta2-py2.5-linux-x86_64.egg/sqlalchemy/orm/collections.py",
line 570, in __iter__
    return iter(getattr(self._data(), '_sa_iterator')())
AttributeError: 'NoneType' object has no attribute '_sa_iterator'

I don't have a good test for this, but i'm trying to create one.
Does anyone knows why this is happening?

Thanks!



--
Sebastian Elsner    -    pipeline td   -   r i s e |  fx

t:  +49 30 20180300                 sebast...@risefx.com
c:  +49 175 3365739                       www.risefx.com

r i s e |  fx  GmbH
Schlesische Strasse 28 Aufgang B, 10997 Berlin
Geschäftsführer: Sven Pannicke, Robert Pinnow

Handelsregister Berlin HRB 106667 B

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to