开发者

Python Tornado Web - AttributeError: 'Connection' object has no attribute '_execute'

I'm experiencing a strange behaviour working with the latest branch of tornadoweb when I deploy my app on my production server.

I tested several times the code and it is fully working when I test it on my laptop (Archlinux) with python 2.6.3 and MySQLdb 1.2.3b2.

As soon as I deploy on my production server (Ubuntu x64) with python 2.6.2, MySQLdb 1.2.3.c1 ('ve tested also with 1.2.1 version) and call for that page it raises 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' 

The strange behaviour is also that testing the native demo (called blog) on my laptop it works fine, but as soon as I deploy it in production it stop working with the save trouble listed above.

I have to add that db.get 开发者_Python百科/ db.query functions works fine.


I finally fixed my problem moving to a fresh ubuntu x64 instead of using a i386 version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜