Traceback (most recent call last):

 "reproduce_sqla_bug.py", line 53, in <module>
main()

 "reproduce_sqla_bug.py", line 49, in main
session.query(Invoice1).get(0)

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1151, in query
return self._query_cls(entities, self, **kwargs)

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 106, in __init__
self._set_entities(entities)

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 116, in _set_entities
self._set_entity_selectables(self._entities)

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 149, in _set_entity_selectables
ent.setup_entity(*d[entity])

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2980, in setup_entity
self._with_polymorphic = ext_info.with_polymorphic_mappers

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 712, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py", line 1840, in _with_polymorphic_mappers
configure_mappers()

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py", line 2544, in configure_mappers
mapper._post_configure_properties()

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py", line 1657, in _post_configure_properties
prop.init()

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/interfaces.py", line 143, in init
self.do_init()

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 1512, in do_init
self._setup_join_conditions()

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 1588, in _setup_join_conditions
can_be_synced_fn=self._columns_are_mapped

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 1856, in __init__
self._check_foreign_cols(self.primaryjoin, True)

 "/Users/ca/.virtualenvs/sqlalchemy/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 2374, in _check_foreign_cols
raise sa_exc.ArgumentError(err)sqlalchemy.exc.ArgumentError: Could not locate any relevant foreign key columns for primary join condition 'transactions.invoice_id = invoices.id' on relationship Invoice1.transactions.
Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or are annotated in the join condition with the foreign() annotation.
Traceback (most recent call last):

 "/home/escher/lib/python3.4/cherrypy/_cpwsgi.py", line 234, in __init__
self.run()

 "/home/escher/lib/python3.4/cherrypy/_cpwsgi.py", line 337, in run
request.run(meth, path, qs, rproto, headers, rfile)

 "/home/escher/lib/python3.4/cherrypy/_cprequest.py", line 589, in run
self.respond( pi )

 "/home/escher/lib/python3.4/cherrypy/_cprequest.py", line 647, in respond
self.namespaces( self.config )

 "/home/escher/lib/python3.4/cherrypy/lib/reprconf.py", line 117, in __call__
exit(None, None, None)

 "/home/escher/lib/python3.4/cherrypy/_cptools.py", line 466, in __exit__
tool._setup()

 "/home/escher/lib/python3.4/cherrypy/lib/cpstats.py", line 312, in _setup
self.record_start()

 "/home/escher/lib/python3.4/cherrypy/lib/cpstats.py", line 334, in record_start
'Start Time': time.time(),AttributeError: 'module' object has no attribute '_get_ident'