- changed milestone to 0.4.0
query.get() raise a TypeError Exception
Issue #690
resolved
I obtain this tb when I call the get method of a query object
Traceback (most recent call last):
[some useless calls](remove)
File "/home/david/Projects/sicpac/lib/almagest/storage/user.py", line 69, in get
user = query.get(id)
File "/home/david/Projects/sqlalchemy/lib/sqlalchemy/orm/query.py", line 82, in get
return self._get(key, ident, **kwargs)
File "/home/david/Projects/sqlalchemy/lib/sqlalchemy/orm/query.py", line 718, in _get
q = q.params(**params)._select_context_options(populate_existing=reload, version_check=(lockmode is not None))
exceptions.TypeError: params() keywords must be strings
printing **params shows:
{u'users_id': 'catalogatore'}
to solve this problem I call str to the params' keys (see the attached file)
Comments (3)
-
repo owner -
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 0.4.0 (automated comment)
- Log in to comment
ah, well the real error is params() only handles *params. we do need to support unicode keys for bind param names, actually. so i might want to put a single args into
params()
so a dictionary can be passed as well.