Unfortunately, I can't. No way to change python version of the server.

But I tried with python 2.6 on my OS X. It works well.


2012년 5월 17일 목요일 오전 6시 17분 54초 UTC+9, Massimo Di Pierro 님의 말:
>
> Any chance you can try 2.5 or 2.7?
>
> On Wednesday, 16 May 2012 11:28:32 UTC-5, JungHyun Kim wrote:
>>
>>
>> The server is Redhat Openshift (cloud PAAS). It uses Python 2.6 on RHEL 6.
>>
>>
>>
>> 2012년 5월 17일 목요일 오전 12시 34분 54초 UTC+9, Massimo Di Pierro 님의 말:
>>>
>>> what python version and os version do you have?
>>>
>>> On Tuesday, 15 May 2012 22:20:00 UTC-5, JungHyun Kim wrote:
>>>>
>>>> Hi. 
>>>>
>>>> I got a error "AttributeError: 'thread._local' object has no attribute 
>>>> 'request'" when trying to run web2py with wsgi.
>>>>
>>>> The application was "welcome" which is sample application of web2py.
>>>>
>>>> in db.py
>>>>
>>>> from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
>>>> auth = Auth(db, hmac_key=Auth.get_or_create_key())
>>>>
>>>>
>>>>
>>>> and in gluon/tools.py
>>>>
>>>> @staticmethod
>>>>     def get_or_create_key(filename=None):
>>>>         request = current.request
>>>>
>>>>
>>>>
>>>> Variablesglobal current<thread._local object>requestundefinedcurrent.
>>>> requestundefined
>>>>
>>>> I have two questions about this.
>>>>
>>>> 1. Does global current variable mean thread._local ?
>>>>
>>>> 2. If then, why thread._local doesn't have request attribute? Did I set 
>>>> wsgi configuration wrong?
>>>>
>>>>
>>>> Thank you very much.
>>>>
>>>>
>>>>

Reply via email to