Exceptions and Python2.6
MySQL database connector for Python programming
Brought to you by:
adustman
I use SQLObject-0.10.4, Python-2.6.1, MySQL-5.1.31, MySQLdb-1.2.2 on PLD Linux. I have a problem with exceptions. In sources of the SQLObject there is something like:
sqlobject/mysql/mysqlconnection.py:
class ErrorMessage(str):
def new(cls, e, append_msg=''):
obj = str.new(cls, e[1] + append_msg)
obj.code = int(e[0])
obj.module = e.module
obj.exception = e.class.name
return obj
but there is no e[1] and this exception causes another exception Tuple Index Out of Range.
Sorry, that there is no sample code, just do for example an IntegrityError.
Are you able to reproduce it?
An example that causes the bug
Here is a small example code.
File Added: m.py
Not testing against SQLobject and I have no clue what is going on here.