this looks like some kind of serialization issue.   are you deserializing 
instances before mappers have been compiled ?    if you upgrade to 0.6, this 
will raise an error immediately at the point at which it occurs.


On May 7, 2010, at 9:49 AM, andrew cooke wrote:

> 
> Hi,
> 
> This trace is from some code that is loading a lot of objects (and
> which usually does so with no problems).  I don't have more details
> yet (it will be quite some work to find out exactly what data is
> causing the error), but it does use joined table inheritance.  Does
> anyone have any idea what the cause might be just from the trace?
> 
> SQLAlchemy 0.5.8 with Python 2.5 on Linux.
> 
> Thanks,
> Andrew
> 
>  File "/usr/local/home/andrewc/tngb3/repository-lib/src/kpi/load/
> manage/statio\
> ns.py", line 170, in _zero
>    loader.commit()
>  File "/usr/local/home/andrewc/tngb3/repository-lib/src/kpi/load/load/
> loader.p\
> y", line 169, in commit
>    self.__load_data(entity_map, time_series_map, metric_map)
>  File "/usr/local/home/andrewc/tngb3/repository-lib/src/kpi/load/load/
> loader.p\
> y", line 291, in __load_data
>    self.__session.flush()
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/sessi\
> on.py", line 1354, in flush
>    self._flush(objects)
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/sessi\
> on.py", line 1432, in _flush
>    flush_context.execute()
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/unito\
> fwork.py", line 261, in execute
>    UOWExecutor().execute(self, tasks)
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/unito\
> fwork.py", line 753, in execute
>    self.execute_save_steps(trans, task)
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/unito\
> fwork.py", line 768, in execute_save_steps
>    self.save_objects(trans, task)
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/unito\
> fwork.py", line 759, in save_objects
>    task.mapper._save_obj(task.polymorphic_tosave_objects, trans)
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/mappe\
> r.py", line 1434, in _save_obj
>    if mapper._get_state_attr_by_column(state, col) is None and
> len(primary_key\
> ) > i:
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/mappe\
> r.py", line 1111, in _get_state_attr_by_column
>    return self._get_col_to_prop(column).getattr(state, column)
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/prope\
> rties.py", line 99, in getattr
>    return state.get_impl(self.key).get(state, state.dict)
>  File "/usr/local/home/andrewc/SQLAlchemy-0.5.8/build/lib/sqlalchemy/
> orm/state\
> .py", line 92, in get_impl
>    return self.manager.get_impl(key)
> AttributeError: 'InstanceState' object has no attribute 'manager'
> 
> -- 
> 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.
> 

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