AttributeError: 'Connection' object has no attribute '_execute'

2,085 views
Skip to first unread message

Matteo Crippa

unread,
Oct 24, 2009, 6:59:26 AM10/24/09
to Tornado Web Server
Hi,

i'm experiencing a strange behaviour meanwhile I try to deploy my
tornado app on my production server.

Let's me try to explain the situation.

I developed a little app that use mysql to store data and when I test
it on my laptop with python 2.6.3 and python-MySQLdb 1.2.3b2 there
were no problems, but as soon as I deploy my app on my production
server that uses python 2.6.2 and python-MySQLdb 1.2.2 the app fails
to render the page raising this error:

Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/tornado/web.py", line
688, in _execute
getattr(self, self.request.method.lower())(*args, **kwargs)
File "/var/www/app.py", line 122, in get
self.store_db('cc',test)
File "/var/www/app.py", line 82, in store_db
self.db.execute(query)
File "/usr/local/lib/python2.6/dist-packages/tornado/database.py",
line 132, in execute
self._execute(cursor, query, parameters)
AttributeError: 'Connection' object has no attribute '_execute'

Any advice on how to fix this?


I'm using the latest revision of tornato made by Richard Taylor in
order to fix reconnect issuses.

Matteo Crippa

unread,
Oct 24, 2009, 11:25:00 AM10/24/09
to Tornado Web Server
I tried also to upgrade mysql-python to 1.2.3c but still no luck.

Db connections seems to work fine with self.db.get and self.db.query,
but as soon as I invoke a self.db.execute it hangs.

I test this also with a fresh unzipped copy of the demo blog source
but with still no luck in production.

Matteo Crippa

unread,
Oct 25, 2009, 7:48:39 PM10/25/09
to Tornado Web Server
I solved this moving form ubuntu i386 to ubuntu x64 it started working
fine.
Reply all
Reply to author
Forward
0 new messages