Skip to content
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

prodcatalog pod goes in CrashLoopBackOff. Python Import error: cannot import name 'json' from 'itsdangerous' #12

Open
nikitsrj opened this issue Feb 18, 2022 · 2 comments

Comments

@nikitsrj
Copy link

I deployed the pods in EKS, frontend-node and proddetail seems running fine, but prodcatalog pod goes in crashloopbackoff.

Here is the pod log error.

ec2-user:~/environment/eks-app-mesh-polyglot-demo/deployment (master) $ kubectl logs -f prodcatalog-5b85b57487-r4qp7 -n prodcatalog-ns
Traceback (most recent call last):
  File "/usr/local/bin/flask", line 5, in <module>
    from flask.cli import main
  File "/usr/local/lib/python3.9/site-packages/flask/__init__.py", line 21, in <module>
    from .app import Flask, Request, Response
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 26, in <module>
    from . import cli, json
  File "/usr/local/lib/python3.9/site-packages/flask/json/__init__.py", line 21, in <module>
    from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.9/site-packages/itsdangerous/__init__.py)

I think it's the issue of python docker image version of the way we are using pip ? Any suggestion or fixes?

@uallu
Copy link

uallu commented Feb 18, 2022

I am seeing the same issue with Python 3.7

@nikitsrj
Copy link
Author

Even with the latest docker file which have python3.9, the issue still persists.

@uallu If you want to run just for temporary purpose, you can just use the public image which i found from helmchart public.ecr.aws/u2g6w7p2/eks-workshop-demo/product_catalog:1.0. I did the same. But if i am building the image with the dockerfile, issue still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants