ConPaaS-team / conpaas

ConPaaS: integrated runtime environment for elastic cloud applications
http://www.conpaas.eu
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

crashing cpsconf.py: Flask_OpenID-1.2.2 has a bug(?) that was not present in 1.2.1 #81

Closed engbert closed 9 years ago

engbert commented 9 years ago

When installing director on a clean platform, cpsconf.py crashes, reporting the following trace.

Traceback (most recent call last):
  File "/usr/local/bin/cpsconf.py", line 5, in 
    pkg_resources.run_script('cpsdirector==1.4.1', 'cpsconf.py')
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1200, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.6/dist-packages/cpsdirector-1.4.1-py2.6.egg/EGG-INFO/scripts/cpsconf.py", line 3, in 
    from cpsdirector import common, db
  File "/usr/local/lib/python2.6/dist-packages/cpsdirector-1.4.1-py2.6.egg/cpsdirector/__init__.py", line 24, in 
    oid = OpenID(app, safe_roots=[], extension_responses=[pape.Response])
  File "/usr/local/lib/python2.6/dist-packages/Flask_OpenID-1.2.2-py2.6.egg/flask_openid.py", line 343, in __init__
    if isstring(app):
  File "/usr/local/lib/python2.6/dist-packages/Flask_OpenID-1.2.2-py2.6.egg/flask_openid.py", line 107, in isstring
    if sys.version_info.major >= 3:
AttributeError: 'tuple' object has no attribute 'major'

I never saw this before, but I noticed that in my previous development for OpenID, I installed Flask_OpenID-1.2.1 and here, through dependencies Flask_OpenID-1.2.2 is installed. So I replaced 1.2.2 by 1.2.1

pip uninstall flask-openid
pip install https://pypi.python.org/packages/source/F/Flask-OpenID/Flask-OpenID-1.2.1.tar.gz

and re-installed the director. Now cpsconf.py neatly ran to completion.

I still have to check if the results are OK. I will also issue a bug report to the package developer(s).

I'll get back on this by tomorrow.

tcrivat commented 9 years ago

I checked on all three systems where I recently deployed ConPaaS, all have Flask_OpenID version 1.2.1 installed by default.

engbert commented 9 years ago

The bug was fixed in https://github.com/mitsuhiko/flask-openid/issues/38 cpsconf.py now runs fine with Flask_OpenID version 1.2.3 Closing the issue