On Feb 27, 2012, at 10:42 AM, Jakob D. wrote: > Yes, the error was reproduced. > > I'm using 0.4.7.
ouch ! > > I couldn't import Session, any particular reason you imported it? i was trying to play with how to get elixir.session to mean something. It's not something that would work in 0.4. > > Here's the output, it seems to get the entry just fine: (I only get one entry > by id to minimize the output) The current version of Elixir doesn't seem to even work with 0.4.7 as it's calling upon session.add(). Nor does the current version of SQLite as there was a change in their cursor behavior that was long ago accounted for in SQLA, so I switched to MySQL. But with 0.4.7p1 where add() was added, it runs fine, as with 0.4.8. Perhaps Elixir version here ? > > 2012-02-27 16:19:37,080 INFO sqlalchemy.engine.base.Engine.0x..cL SHOW > VARIABLES LIKE 'sql_mode' > 2012-02-27 16:19:37,080 INFO sqlalchemy.engine.base.Engine.0x..cL {'charset': > None} > 2012-02-27 16:19:37,081 INFO sqlalchemy.engine.base.Engine.0x..cL DESCRIBE > `projects` > 2012-02-27 16:19:37,081 INFO sqlalchemy.engine.base.Engine.0x..cL {} > 2012-02-27 16:19:37,083 INFO sqlalchemy.engine.base.Engine.0x..cL DESCRIBE > `media` > 2012-02-27 16:19:37,083 INFO sqlalchemy.engine.base.Engine.0x..cL {} > 2012-02-27 16:19:37,084 INFO sqlalchemy.engine.base.Engine.0x..cL DESCRIBE > `media_variants` > 2012-02-27 16:19:37,085 INFO sqlalchemy.engine.base.Engine.0x..cL {} > 2012-02-27 16:19:37,086 INFO sqlalchemy.engine.base.Engine.0x..cL DESCRIBE > `image_variants` > 2012-02-27 16:19:37,086 INFO sqlalchemy.engine.base.Engine.0x..cL {} > 2012-02-27 16:19:37,087 INFO sqlalchemy.engine.base.Engine.0x..cL DESCRIBE > `media_attributes` > 2012-02-27 16:19:37,087 INFO sqlalchemy.engine.base.Engine.0x..cL {} > 2012-02-27 16:19:37,088 INFO sqlalchemy.engine.base.Engine.0x..cL DESCRIBE > `images` > 2012-02-27 16:19:37,088 INFO sqlalchemy.engine.base.Engine.0x..cL {} > 2012-02-27 16:19:37,096 INFO sqlalchemy.engine.base.Engine.0x..cL BEGIN > 2012-02-27 16:19:37,096 INFO sqlalchemy.engine.base.Engine.0x..cL SELECT > media.id AS media_id, media.project_id AS media_project_id, media.status AS > media_status, media.row_type AS media_row_type > FROM media > WHERE media.id = %s ORDER BY media.id > LIMIT 0, 1 > 2012-02-27 16:19:37,096 INFO sqlalchemy.engine.base.Engine.0x..cL > [u'02pMhPqJkOQYm27sW0NAzxGoarN'] > 2012-02-27 16:19:37,098 INFO sqlalchemy.engine.base.Engine.0x..cL SELECT > images.media_id AS images_media_id, images.width AS images_width, > images.height AS images_height > FROM images > WHERE %s = images.media_id > 2012-02-27 16:19:37,098 INFO sqlalchemy.engine.base.Engine.0x..cL > ['02pMhPqJkOQYm27sW0NAzxGoarN'] > 2012-02-27 16:19:37,100 INFO sqlalchemy.engine.base.Engine.0x..cL SELECT > media_variants.id AS media_variants_id, media_variants.original_id AS > media_variants_original_id, media_variants.row_type AS > media_variants_row_type > FROM media_variants > WHERE media_variants.original_id = %s ORDER BY media_variants.id > 2012-02-27 16:19:37,101 INFO sqlalchemy.engine.base.Engine.0x..cL > ['02pMhPqJkOQYm27sW0NAzxGoarN'] > 2012-02-27 16:19:37,103 INFO sqlalchemy.engine.base.Engine.0x..cL SELECT > image_variants.mediavariant_id AS image_variants_mediavariant_id, > image_variants.width AS image_variants_width, image_variants.height AS > image_variants_height > FROM image_variants > WHERE %s = image_variants.mediavariant_id > 2012-02-27 16:19:37,103 INFO sqlalchemy.engine.base.Engine.0x..cL [316956L] > Traceback (most recent call last): > File "delete_test2.py", line 63, in <module> > media.delete() > File "/usr/lib/python2.5/site-packages/elixir/entity.py", line 963, in > delete > return object_session(self).delete(self, *args, **kwargs) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/session.py", line > 961, in delete > for c, m in _cascade_iterator('delete', instance): > File "/var/lib/python-support/python2.5/sqlalchemy/orm/session.py", line > 1253, in _cascade_iterator > for (o, m) in mapper.cascade_iterator(cascade, instance._state, **kwargs): > File "/var/lib/python-support/python2.5/sqlalchemy/orm/mapper.py", line > 1335, in cascade_iterator > instance, instance_mapper, corresponding_state = iterator.next() > File "/var/lib/python-support/python2.5/sqlalchemy/orm/properties.py", line > 451, in cascade_iterator > instances = attributes.get_as_list(state, self.key, passive=passive) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/attributes.py", line > 1151, in get_as_list > x = attr.get(state, passive=passive) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/attributes.py", line > 279, in get > value = callable_() > File "/var/lib/python-support/python2.5/sqlalchemy/orm/strategies.py", line > 466, in __call__ > result = q.all() > File "/var/lib/python-support/python2.5/sqlalchemy/orm/query.py", line 878, > in all > return list(self) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/query.py", line > 1017, in iterate_instances > context.attributes.get(('populating_mapper', ii), > _state_mapper(ii))._post_instance(context, ii) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/mapper.py", line > 1517, in _post_instance > p(state.obj(), **kwargs) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/mapper.py", line > 1547, in post_execute > self.populate_instance(selectcontext, instance, row, isnew=False, > instancekey=identitykey, ispostselect=True, only_load_props=only_load_props) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/mapper.py", line > 1484, in populate_instance > (newpop, existingpop, post_proc) = selectcontext.exec_with_path(self, > prop.key, prop.create_row_processor, selectcontext, self, row) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/query.py", line > 1703, in exec_with_path > return fn(*args, **kwargs) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/interfaces.py", line > 532, in create_row_processor > return > self._get_context_strategy(selectcontext).create_row_processor(selectcontext, > mapper, row) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/strategies.py", line > 75, in create_row_processor > elif self.columns[0] in row: > TypeError: argument of type 'NoneType' is not iterable > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/sqlalchemy/-/LhpRDeCqYNYJ. > To post to this group, send email to sqlalchemy@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 sqlalchemy@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.