Hi Victor,

In data martedì 23 febbraio 2010 13:11:37, Victor Engmark ha scritto:
> I'm having some trouble running unit tests that modify the database -
> They never seem to be able to do anything. Has anyone else seen this
> error before? Its explanation
> <http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html>
> doesn't help much;
> vengmark@pcgssi10:/opt/cds-invenio/lib/python/invenio$ grep
> mysql_use_result * returned nothing. Also,
> vengmark@pcgssi10:/opt/cds-invenio/var/log$ grep -i mysql *
> returned only a lot of "Module _mysql was already imported" messages.
> 
> vengmark@pcgssi10:~/src/cds-invenio/modules/webtag/lib (webtag)$
> ./webtag_tests.py --yes-i-know
> ^CTraceback (most recent call last):
> [...]
> KeyboardInterrupt
> Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of
> sync; you can't run this command now") in <bound method Cursor.__del__
> of <MySQLdb.cursors.Cursor object at 0x8f1df8c>> ignored

for the Out of sync error, in this case, it most probably due to the 
KeyboardInterrupt (caused by Ctrl-C) that you have hit. This normally causes 
an unexpected loss of connection with MySQL which translates into the Out of 
sync error.

The "Module _mysql was already imported" messages are harmless (IMHO) and they 
happens on Ubuntu...

For the exact explanation of why you can't run the unittest unfortunately I 
can't tell :-( I would need to see your particular file...

Cheers!
        Sam

-- 
Samuele Kaplun ** CERN Document Server ** <http://cds.cern.ch/>

Reply via email to