-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] python-flask server ImportError exception at launch #17063
Comments
I have a very similiar problem
this is from my app.py
This is the generated code beeing generated:
Maybe it would work if the generator would generate the same but use the standard JSON encoder from connexion?
|
Actually the issue is probably solved by using Here's the current jsonproviderClass: I think the current code that the generator generates is incorrect and should be replaced. |
This might fix it But I can't get the dev setup running. |
checked . its still in 7.2.0 :( checked out https://github.com/MarkSchmidts/openapi-generator/tree/master but
Found also this swagger-api/swagger-codegen#12278 |
Is there any workaround for this, or should we try to monkey-patch with the patch @MarkSchmidts suggested for now? |
I got no working workaround. sorry. |
A workaround that helped me to run the generated server was to remove these lines from the requirements.txt file:
and replace it with:
AND replace in the Dockerfile the line
to
|
i think this has been fixed in the latest master. please pull the latest or use the snapshot JAR to give it a try. |
Idk why i got now this issue when starting the generator:
Its mentioned in Im sry, but is it another issue or my setup? best |
which JDK version are you using? the latest 7.x requires JDK11 + |
openjdk 17.0.9 2023-10-17
OpenJDK Runtime Environment (build 17.0.9+9-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.9+9-Debian-1deb12u1, mixed mode,
sharing)
Am So., 28. Jan. 2024 um 15:08 Uhr schrieb William Cheng <
***@***.***>:
… which JDK version are you using?
the latest 7.x requires JDK11 +
—
Reply to this email directly, view it on GitHub
<#17063 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQLAUV2Q73GY27DTLDHE23YQZLVHAVCNFSM6AAAAAA7J4JEWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGYYDQOJYGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
can you please PM me via Slack this week to help you troubleshoot the issue? |
I have followed the workaround suggested by @EingeoelterBolt above and removed, recreated, and activated my virtual environment (python -m venv venv) to make sure there are no collisions.. Now I receive the error:
|
I resolved the above issue by downgrading the python virtual environment for server execution to python 3.9 instead of python 3.11. Still using @EingeoelterBolt's changes to requirements.txt |
Bug Report Checklist
Description
openapi-generator version
7.0.1
OpenAPI declaration file content or url
Generation Details
api: python-flask server
pip3 install -r python-flask-server/requirements.txt
Steps to reproduce
curl api
unzip
pip3 install -r python-flask-server/requirements.txt
run in vscode
cd /home/d3vopz/openapi ; /usr/bin/env /home/d3vopz/openapi/.venv/bin/python /home/d3vopz/.vscode-server/extensions/ms-python.python-2023.20.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 56187 -- /home/d3vopz/openapi/test/resources/spec/out/python-flask-server/openapi/__main__.py --resource-path /home/d3vopz/etl/resources/inject
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: