Sure - I think it's the same as the original poster's, but the traceback
I'm getting is:
>>> inspect(Project).relationships
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "./sqlalchemy/util/langhelpers.py", line 712, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "./sqlalchemy/orm/mapper.py", line 2037, in relationships
return self._filter_properties(properties.RelationshipProperty)
File "./sqlalchemy/orm/mapper.py", line 2054, in _filter_properties
configure_mappers()
File "./sqlalchemy/orm/mapper.py", line 2560, in configure_mappers
mapper._post_configure_properties()
File "./sqlalchemy/orm/mapper.py", line 1673, in
_post_configure_properties
prop.init()
File "./sqlalchemy/orm/interfaces.py", line 143, in init
self.do_init()
File "./sqlalchemy/orm/relationships.py", line 1510, in do_init
self._setup_join_conditions()
File "./sqlalchemy/orm/relationships.py", line 1586, in
_setup_join_conditions
can_be_synced_fn=self._columns_are_mapped
File "./sqlalchemy/orm/relationships.py", line 1849, in __init__
self._determine_joins()
File "./sqlalchemy/orm/relationships.py", line 1915, in _determine_joins
consider_as_foreign_keys=consider_as_foreign_keys
File "<string>", line 2, in join_condition
File "./sqlalchemy/sql/selectable.py", line 692, in _join_condition
b.foreign_keys,
AttributeError: 'tuple' object has no attribute 'foreign_keys'
On Wed, Jul 9, 2014 at 2:04 PM, Mike Bayer <[email protected]> wrote:
>
> On 7/9/14, 3:41 PM, Paul Molodowitch wrote:
>
> I just ran into the same problem, using python 2.6 + sqlalchemy 0.9.4 /
> 0.9.6 + MySQL.
>
> The problem in my case IS definitely related to python 2.6 - basically,
> python 2.6 doesn't allow unicode keywords, while 2.7 does. Ie, if you do
> this:
>
> def foo(**kwargs):
> print kwargs
> foo(**{u'thing':1})
>
>
> ...it will work in 2.7, but give this error in 2.6:
>
> TypeError: foo() keywords must be strings
>
>
> For reference, these were the table.dialect_kwargs.keys() that were
> making trouble in 2.6:
>
> [u'mysql_comment', u'mysql_engine', u'mysql_default charset']
>
>
> Fine, except for the fact that they're unicode...
>
> OK but this is not a codepath within SQLAlchemy's MySQL reflection code.
> I'm PDBing right now into 0.9, using py2.6 + use_unicode=1; the reflected
> table options are sent directly into table.kwargs, not using the
> constructor or any **kw system. the tests pass, and the keys are coming
> back as u''.
>
> if you can show me where table.kwargs gets used implicitly as a
> constructor arg i can fix that.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sqlalchemy" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sqlalchemy/E3MhX1m8QqQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.