Update flask version to fix error#3
Closed
xkwangcn wants to merge 1 commit into
Closed
Update flask version to fix error#3xkwangcn wants to merge 1 commit into
xkwangcn wants to merge 1 commit into
Conversation
Author
|
only want do the same thing as odo-devfiles#1, but I can't sync changes from odo-devfiles, so I re-created this PR to update the flask version. |
Author
|
@johnmcollier hi, could you help review this? Thank you very much. |
Author
|
this repo code working fine... I mistakenly thought this was the same error as there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I trying this on s390x, but seems not only the issue for s390x, so I create the PR. Maybe you need try it on x86 platform about this issue.
With Flask=1.1.2, when do odo push, have the following error:
[odo@a04931b0508f python]$ odo push -f
✓ Waiting for Kubernetes resources [114ms]
✓ Syncing files into the container [631ms]
✓ Building your application in container on cluster [2s]
✓ Executing the application [1s]
⚠ devfile command "run-app" exited with error status within 1 sec
Last 20 lines of the component's log:
time="2022-03-16T02:37:30Z" level=info msg="force to kill the program" program=debugrun
time="2022-03-16T02:37:30Z" level=debug msg="no auth required"
time="2022-03-16T02:37:30Z" level=debug msg="succeed to find process:devrun"
time="2022-03-16T02:37:30Z" level=info msg="try to start program" program=devrun
time="2022-03-16T02:37:30Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is python app.py
Changing directory to ${PROJECT_SOURCE}
Executing command cd ${PROJECT_SOURCE} && python app.py
Traceback (most recent call last):
File "app.py", line 1, in
from flask import Flask
File "/home/jboss/.local/lib/python3.8/site-packages/flask/init.py", line 19, in
from . import json
File "/home/jboss/.local/lib/python3.8/site-packages/flask/json/init.py", line 15, in
from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/home/jboss/.local/lib/python3.8/site-packages/itsdangerous/init.py)
time="2022-03-16T02:37:31Z" level=debug msg="wait program exit" program=devrun
time="2022-03-16T02:37:31Z" level=error msg="program stopped with error:exit status 1" program=devrun
time="2022-03-16T02:37:31Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
To get the full log output, please run 'odo log'
Pushing devfile component "my-python"
✓ Changes successfully pushed to component
Then update it to Flask=2.0.3, do odo push again, it working fine.
[odo@a04931b0508f python]$ odo push -f
✓ Waiting for Kubernetes resources [126ms]
✓ Syncing files into the container [604ms]
✓ Building your application in container on cluster [2s]
✓ Executing the application [1s]
Pushing devfile component "my-python"
✓ Changes successfully pushed to component