Hi,
This is a kind of a shot in the dark, but I figure maybe someone else
has run into the same thing. We use MySQL exclusively, except during
unit tests, where we use sqlite. Our schema has some columns with
type 'BIT' (and cannot be easily change), so they're defined as the SA
type MSBit. The weird thing is that _sometimes_, only when using
sqlite, we get the following error. But it's very hard to track down
as it is not consistently reproducible, which is weird for this sort
of thing. But the one thing that consistently makes it go away is to
use some other type (other than MSBit) in SA's column definition;
except that's not a good solution because it doesn't actually work
(the BIT is supposed to act as a boolean, but if you change the type
to Boolean it won't return the right thing in all cases).
Anyway, I know that's not much to go on but the overall set up is kind
of hard to reproduce so it would be hard to include more code. I'm
really wondering:
* does anyone recognize this problem?
* is there something obviously dumb I'm doing based on the above?
Thanks,
-- Jacob
======================================================================
ERROR: test_find_journal_index_url_api (__main__.JournalAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "mumble/lib/CoziVaultModel/cozivaultmodel/test_model.py", line
77, in tearDown
self.session.delete(self.find_account())
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/session.py", line 1136, in delete
cascade_states = list(_cascade_state_iterator('delete', state))
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/session.py", line 1537, in _cascade_state_iterator
for (o, m) in mapper.cascade_iterator(cascade, state, **kwargs):
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/mapper.py", line 1168, in cascade_iterator
instance, instance_mapper, corresponding_state = iterator.next()
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/properties.py", line 684, in cascade_iterator
instances = state.value_as_iterable(self.key, passive=passive)
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/attributes.py", line 917, in value_as_iterable
x = impl.get(self, passive=passive)
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/attributes.py", line 375, in get
value = callable_()
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/strategies.py", line 589, in __call__
result = q.all()
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/query.py", line 1193, in all
return list(self)
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/query.py", line 1348, in instances
rows = [process[0](context, row) for row in fetch]
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/query.py", line 1946, in main
return _instance(row, None)
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/mapper.py", line 1640, in _instance
populate_state(state, row, isnew, only_load_props)
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/mapper.py", line 1530, in populate_state
populator(state, row, isnew=isnew, **flags)
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/orm/strategies.py", line 119, in new_execute
state.dict[key] = row[col]
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/engine/base.py", line 1348, in __getitem__
return self.__parent._get_col(self.__row, key)
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/engine/base.py", line 1620, in _get_col
return processor(row[index])
File "mumble/output/site-packages/SQLAlchemy-0.5.3-py2.6.egg/
sqlalchemy/databases/mysql.py", line 682, in process
for i in map(ord, value):
TypeError: argument 2 to map() must support iteration
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---