On 19/11/2013 14:16, Damien Accorsi wrote:
On 19/11/2013 13:10, Damien Accorsi wrote:
Hi all,

I work on a TG2.3 project which has been developed using python 2.7. Before releasing, I plan to upgrade to python 3. I'm the only user for now so it's the best time to do so.

When setting up my environment with python3 / virtualenv and tg2.3, I get the following error on setup :

Downloading/unpacking sprox
   Running setup.py egg_info for package sprox
     Traceback (most recent call last):
       File "<string>", line 14, in <module>
       File "/tmp/pod/tg2env/build/sprox/setup.py", line 6, in <module>
         execfile(os.path.join(here, 'sprox', 'release.py'))
     NameError: name 'execfile' is not defined
     Complete output from command python setup.py egg_info:
     Traceback (most recent call last):

   File "<string>", line 14, in <module>

   File "/tmp/pod/tg2env/build/sprox/setup.py", line 6, in <module>

     execfile(os.path.join(here, 'sprox', 'release.py'))

NameError: name 'execfile' is not defined

----------------------------------------
Command python setup.py egg_info failed with error code 1 in 
/tmp/pod/tg2env/build/sprox

According to the sprox bitbucket repository and issue tracker, - https://bitbucket.org/percious/sprox/issue/45/add-python-3-support , python3 is not yet supported by sprox. I do not use sprox on my own, so...

  * Do I have some dependencies I miss ?
  * Does TG2.3 really support python 3 ? (and in this case how can I
    fix this sprox-specific problem ?)

Thank's.

Damien

--
You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/groups/opt_out.

More information : According to the following PDF from Alessandro Molina, -https://ep2013.europython.eu/media/conference/slides/web-applications-with-turbogears-on-python3-and-python2.pdf

I tried to quickstart a new project without tw dependencies and to move my code to this new project. Now gearbox starts, but when accessing any page, I get the following error :
Traceback (most recent call last):
   File "/tmp/pod/tg2env/lib/python3.2/site-packages/tg/support/registry.py", 
line 247, in __call__
     app_iter = self.application(environ, start_response)
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/tg/support/middlewares.py", line 
65, in __call__
     status, headers, app_iter, exc_info = _call_wsgi_application(self.app, 
environ)
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/tg/support/middlewares.py", line 
20, in _call_wsgi_application
     app_iter = application(environ, _start_response)
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/tg/support/middlewares.py", line 
130, in __call__
     return self._stream_response(self.app(environ, start_response))
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/tg/support/transaction_manager.py",
 line 75, in __call__
     reraise(*exc_info)
   File "/tmp/pod/tg2env/lib/python3.2/site-packages/tg/_compat.py", line 79, 
in reraise
     raise value
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/tg/support/transaction_manager.py",
 line 51, in __call__
     response_data = self.app(environ, _start_response)
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/repoze.who-2.2-py3.2.egg/repoze/who/middleware.py",
 line 76, in __call__
     identity = api.authenticate()
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/repoze.who-2.2-py3.2.egg/repoze/who/api.py",
 line 129, in authenticate
     ids = self._identify()
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/repoze.who-2.2-py3.2.egg/repoze/who/api.py",
 line 308, in _identify
     identity = plugin.identify(self.environ)
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/repoze.who-2.2-py3.2.egg/repoze/who/plugins/auth_tkt.py",
 line 85, in identify
     userid = decoder(userid)
   File 
"/tmp/pod/tg2env/lib/python3.2/site-packages/repoze.who-2.2-py3.2.egg/repoze/who/plugins/auth_tkt.py",
 line 27, in <lambda>
     'unicode': lambda x: utf_8_decode(x)[0],
TypeError: 'str' does not support the buffer interface

repoze.who is not supporting python3 ?
Extra (last) information: the problem was because of a python2.7 user session. I logged out with the python 2.7 instance and restart the python 3.2 application and all went ok (ie I can start my application port to python 3)


--
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to