SchemaSync icon indicating copy to clipboard operation
SchemaSync copied to clipboard

Schemasync TypeError

Open eileenzliu opened this issue 11 years ago • 4 comments

I got the following errors when trying to run schemasync on two databases:

Traceback (most recent call last): File "/usr/local/bin/schemasync", line 9, in load_entry_point('SchemaSync==0.9.2', 'console_scripts', 'schemasync')() File "build/bdist.macosx-10.9-intel/egg/schemasync/schemasync.py", line 264, in main File "build/bdist.macosx-10.9-intel/egg/schemasync/schemasync.py", line 123, in processor File "build/bdist.macosx-10.9-intel/egg/schemasync/schemasync.py", line 210, in app File "build/bdist.macosx-10.9-intel/egg/schemaobject/schema.py", line 48, in selected File "build/bdist.macosx-10.9-intel/egg/schemaobject/schema.py", line 67, in databases File "build/bdist.macosx-10.9-intel/egg/schemaobject/database.py", line 29, in DatabaseSchemaBuilder File "build/bdist.macosx-10.9-intel/egg/schemaobject/connection.py", line 63, in execute File "/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/MySQLdb/cursors.py", line 187, in execute query = query % tuple([db.literal(item) for item in args]) TypeError: not all arguments converted during string formatting

After I installed the schema sync, I had to run the following command to get rid of an error complaining "Mysqldb" not found.

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

Any clue what the problem is?

Thanks!

eileenzliu avatar Dec 04 '13 01:12 eileenzliu

Having the same problem, any updates on this?

ghost avatar Feb 26 '14 16:02 ghost

Yes, a change in MySQLdb 1.2.5 is not compatible with schemasync, use MySQLdb 1.2.4 https://github.com/farcepest/MySQLdb1/commit/87d1145c0d6ee4f5a8ecf6d5c62d2479b9cf27ea

myzhan avatar Apr 30 '14 01:04 myzhan

The issue is with schemaobject 0.5.3

Change line 32 of database.py from:

databases = conn.execute(sql, params)

to

 databases = conn.execute(sql, (params,))

conn.execute now expects an actual tuple in all cases.

gpayet avatar Dec 12 '14 19:12 gpayet

The package 1.2.4 is not available. I installed MySQLdb 1.2.3 using this:

sudo pip install -Iv http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download

My schemasync command worked fine after that.

afilina avatar Mar 25 '15 22:03 afilina