TypeError in sqlalchemy.orm.strategy_options.Load.__str__ under certain conditions

Issue #3539 resolved
v created an issue

The __str__ method for this class is defined on line 182 here:

https://bitbucket.org/zzzeek/sqlalchemy/src/50866d2f857dd45bb2d186a0fa076768437d62a3/lib/sqlalchemy/orm/strategy_options.py?fileviewer=file-view-default#strategy_options.py-182:183

I encountered this logging error:

TypeError: not all arguments converted during string formatting

Upon inspection, the value of self.strategy was

(('deferred', False), ('instrument', True))

The really strange thing is that I only saw this error when trying to configure logging. Up until this point, I had been using create_engine(echo=True) and never encountered this error.

Comments (4)

  1. Log in to comment