Travis build failure with the following error message:
Using /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/idna-2.8-py3.6.egg
Searching for Werkzeug==0.15.4
Best match: Werkzeug 0.15.4
Adding Werkzeug 0.15.4 to easy-install.pth file
Using /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages
Searching for Click==7.0
Best match: Click 7.0
Adding Click 7.0 to easy-install.pth file
Using /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages
Searching for itsdangerous==1.1.0
Best match: itsdangerous 1.1.0
Adding itsdangerous 1.1.0 to easy-install.pth file
Using /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages
Finished processing dependencies for openapi-server==1.0.0
GLOB sdist-make: /home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/setup.py
py3 create: /home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3
py3 installdeps: -r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/requirements.txt, -r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/test-requirements.txt
py3 inst: /home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/.tmp/package/1/openapi_server-1.0.0.zip
py3 installed: certifi==2019.6.16,chardet==3.0.4,Click==7.0,clickclick==1.2.2,connexion==2.0.0,coverage==4.5.3,Flask==1.1.0,Flask-Testing==0.6.1,idna==2.8,importlib-metadata==0.18,inflection==0.3.1,itsdangerous==1.1.0,Jinja2==2.10.1,jsonschema==2.6.0,MarkupSafe==1.1.1,nose==1.3.7,openapi-server==1.0.0,openapi-spec-validator==0.2.7,pluggy==0.12.0,py==1.8.0,python-dateutil==2.6.0,PyYAML==5.1.1,randomize==0.14,requests==2.22.0,six==1.12.0,swagger-ui-bundle==0.0.2,urllib3==1.25.3,Werkzeug==0.15.4,zipp==0.5.1
py3 run-test-pre: PYTHONHASHSEED='2015464316'
py3 run-test: commands[0] | nosetests
E
======================================================================
ERROR: Failure: ImportError (cannot import name 'json_available')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3/lib/python3.6/imp.py", line 245, in load_module
return load_package(name, filename)
File "/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3/lib/python3.6/imp.py", line 217, in load_package
return _load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/openapi_server/test/__init__.py", line 4, in <module>
from flask_testing import TestCase
File "/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3/lib/python3.6/site-packages/flask_testing/__init__.py", line 13, in <module>
from .utils import TestCase, LiveServerTestCase
File "/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3/lib/python3.6/site-packages/flask_testing/utils.py", line 32, in <module>
from flask import json_available, templating, template_rendered
ImportError: cannot import name 'json_available'
----------------------------------------------------------------------
Ran 1 test in 0.639s
FAILED (errors=1)
ERROR: InvocationError for command /home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-flask/.tox/py3/bin/nosetests (exited with code 1)
___________________________________ summary ____________________________________
ERROR: py3: commands failed
make: *** [test-all] Error 1
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (nose-test) on project PythonFlaskConnexionTests: Command execution failed. Process exited with an error: 2 (Exit value: 2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :PythonFlaskConnexionTests
Ref: https://travis-ci.org/OpenAPITools/openapi-generator/builds/554746558
Likely due to change in the build image.
We'll comment out the Python Flask test for the time being.
Latest master
If anyone wants to help with this, please reply to let us know. Thanks.
UPDATE: Commented out the tests via fa10103363
I also have a flask application whose build started failing in CI since today due to this error. Do you have a solution yet? I believe they probably rolled out a new Flask version that may not be backwards compatible with flask_testing
Yeah, there was a new release July 5 https://pypi.org/project/Flask/1.1.0/
Maybe stick with 1.0.4 for the time being?
@wing328 yep, I'm doing that. They're planning on adding it back so it should be compatible with the next release once again (1.1.1)
@aadibajpai thanks for the update on that 馃憤
@wing328 np, you can follow the relevant issue here https://github.com/pallets/flask/issues/3288
Looks like 1.1.1 has been released.
@aadibajpai I wonder if you can help file a PR to re-enable those tests that were commented out via https://github.com/OpenAPITools/openapi-generator/commit/fa10103363da4ce60128488892b359c222397a48
Looks like 1.1.1 has been released.
@aadibajpai I wonder if you can help file a PR to re-enable those tests that were commented out via fa10103
Cool enough, I'll do that in a bit.