Menu

#275 Exceptions and Python2.6

open
MySQLdb (285)
5
2014-02-18
2009-02-08
No

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?

Discussion

  • Witold Filipczyk

    An example that causes the bug

     
  • Witold Filipczyk

    Here is a small example code.
    File Added: m.py

     
  • Andy Dustman

    Andy Dustman - 2009-03-08

    Not testing against SQLobject and I have no clue what is going on here.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.