On Feb 21, 2014, at 7:05 AM, Oliver Bestwalter <oliver.bestwal...@avira.com> 
wrote:

> File 
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", 
> line 166, in first_connect dialect.initialize(c)
> File 
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py", 
> line 2297, in initialize default.DefaultDialect.initialize(self, connection)
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", 
> line 209, in initialize return weakref.WeakKeyDictionary()
> File 
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/mysqldb.py",
>  line 100, in _check_unicode_returns connection, additional_tests)
> TypeError: _check_unicode_returns() takes exactly 2 arguments (3 given)
> 
> for mysql this method was overridden to fix 
> https://github.com/farcepest/MySQLdb1/commit/cd44524fef63bd3fcb71947392326e9742d520e8
>   but now the overriden method is is lacking the optional parameter 
> additional_tests and crashes when called with it.
> I just wanted to check here before I open an issue and it turns out it's 
> something else.


It’s not, I can’t quite explain that particular issue but it seems like your 
Python interpreter is doing something weird - line 209 of default.py is not 
calling into mysqldb like that and it seems like things are not calling each 
other as they should (like, your interpreter is corrupted).    The 
_check_unicode_returns() method is called immediately when an engine first 
connects, and is only called with “self, connection”.  The three-argument form 
is specifically called by the overridden method in the MySQL dialect.    The 
trace seems to be mis-tracking the correct line number in default.py.

I don’t have much advice here except to make sure the SQLAlchemy installation 
is unmodified, and to look into issues like memory usage or native libraries in 
use that may be interfering with the Python interpreter’s stability.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to