#2487: AttributeError: Cursor instance has no attribute 'lastrowid'
------------------------------+---------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  adrian
     Type:  defect            |       Status:  new   
 Priority:  normal            |    Milestone:        
Component:  Database wrapper  |      Version:        
 Severity:  normal            |   Resolution:        
 Keywords:                    |  
------------------------------+---------------------------------------------
Comment (by [EMAIL PROTECTED]):

 Hi,
 
 Thank you for looking into this...
 
 I'm using MySQLdb...below is the output from help(MySQLdb). MySQL 5 was
 installed from the Red Hat rpm.
 
 Do you know how to find the path of a package that python has loaded?
 
 Also, I just tried running a few other model related methods like :
 
 --
 Poll.objects.all() - which gave me a different error:
 
   File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 62, in
 execute
     elif type(args) is ListType and type(args[0]) is TupleType:
 IndexError: list index out of range
 --
 p.save() - which gives me "lastrowid" error:
 
   File "/usr/lib/python2.4/site-
 packages/django/db/backends/mysql/base.py", line 51, in __getattr__
     return getattr(self.cursor, attr)
 AttributeError: Cursor instance has no attribute 'lastrowid'
 --
 help("MySQLdb"):
 
 DATA
     BINARY = DBAPISet(252, 251, 250, 249)
     DATE = DBAPISet(10, 14)
     NULL = 'NULL'
     NUMBER = DBAPISet(0, 5, 4, 9, 3, 8, 1, 13)
     ROWID = DBAPISet()
     STRING = DBAPISet(1, 247, 254, 253)
     TIME = DBAPISet(11,)
     TIMESTAMP = DBAPISet(7, 12)
     __all__ = ['BINARY', 'Binary', 'Connect', 'Connection', 'DATE',
 'Date'...
     __author__ = 'Andy Dustman <[EMAIL PROTECTED]>'
     __revision__ = '1.11'
     __version__ = '0.9.1'
     apilevel = '2.0'
     paramstyle = 'format'
     threadsafety = 1
     version_info = (0, 9, 1, 'final', 1)
 
 VERSION
     0.9.1

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2487>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to