My system:
win2ksp6
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
1.2.1_p2
When mysqldb wants to show warning exception raising instead.
Traceback (most recent call last):
File "test.py", line 8, in ?
db.execute('DROP TABLE IF EXISTS asdfasdfasdfasdf')
File "C:\sbin\Python24\lib\site-packages\MySQLdb\cursors.py", line 166, in execute
self._warning_check()
File "C:\sbin\Python24\lib\site-packages\MySQLdb\cursors.py", line 81, in _warning_check
warn(w[-1], self.Warning, 3)
File "C:\sbin\Python24\lib\warnings.py", line 57, in warn
warn_explicit(message, category, filename, lineno, module, registry)
File "C:\sbin\Python24\lib\warnings.py", line 75, in warn_explicit
if registry.get(key):
TypeError: unhashable type
I changed one line in cursors.py and it solved a problem.
What was the original type? array? This is fixed in 1.2.2b1, please test. This was due to binary collations being converted to arrays; they are now returned as strings.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My system:
win2ksp6
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
1.2.1_p2
When mysqldb wants to show warning exception raising instead.
Traceback (most recent call last):
File "test.py", line 8, in ?
db.execute('DROP TABLE IF EXISTS asdfasdfasdfasdf')
File "C:\sbin\Python24\lib\site-packages\MySQLdb\cursors.py", line 166, in execute
self._warning_check()
File "C:\sbin\Python24\lib\site-packages\MySQLdb\cursors.py", line 81, in _warning_check
warn(w[-1], self.Warning, 3)
File "C:\sbin\Python24\lib\warnings.py", line 57, in warn
warn_explicit(message, category, filename, lineno, module, registry)
File "C:\sbin\Python24\lib\warnings.py", line 75, in warn_explicit
if registry.get(key):
TypeError: unhashable type
I changed one line in cursors.py and it solved a problem.
Was: warn(w[-1], self.Warning, 3)
Become: warn(w[-1].tostring(), self.Warning, 3)
What was the original type? array? This is fixed in 1.2.2b1, please test. This was due to binary collations being converted to arrays; they are now returned as strings.