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

Python container from "Deploying Python Code" starts with an error. Blocker for python option. #210

Open
pittar opened this issue May 18, 2022 · 0 comments

Comments

@pittar
Copy link
Contributor

pittar commented May 18, 2022

Language: Python
Module: Deploying Python Code

There seems to be an issue with the Python code (or dependencies). Although the build completes successfully and the image start, the app does not work. If you look at the pod logs, you see:

[Wed May 18 14:45:01.247844 2022] [wsgi:error] [pid 63:tid 139903059884224] mod_wsgi (pid=63): Failed to exec Python script file '/tmp/mod_wsgi-localhost:8080:1000860000/handler.wsgi'.
[Wed May 18 14:45:01.247873 2022] [wsgi:error] [pid 63:tid 139903059884224] mod_wsgi (pid=63): Exception occurred processing WSGI script '/tmp/mod_wsgi-localhost:8080:1000860000/handler.wsgi'.
[Wed May 18 14:45:01.248628 2022] [wsgi:error] [pid 63:tid 139903059884224] Traceback (most recent call last):
[Wed May 18 14:45:01.248655 2022] [wsgi:error] [pid 63:tid 139903059884224]   File "/tmp/mod_wsgi-localhost:8080:1000860000/handler.wsgi", line 90, in <module>
[Wed May 18 14:45:01.248660 2022] [wsgi:error] [pid 63:tid 139903059884224]     handler = mod_wsgi.server.ApplicationHandler(entry_point,
[Wed May 18 14:45:01.248664 2022] [wsgi:error] [pid 63:tid 139903059884224]   File "/opt/app-root/lib64/python3.8/site-packages/mod_wsgi/server/__init__.py", line 1458, in __init__
[Wed May 18 14:45:01.248665 2022] [wsgi:error] [pid 63:tid 139903059884224]     __import__(entry_point)
[Wed May 18 14:45:01.248668 2022] [wsgi:error] [pid 63:tid 139903059884224]   File "/opt/app-root/src/wsgi.py", line 7, in <module>
[Wed May 18 14:45:01.248670 2022] [wsgi:error] [pid 63:tid 139903059884224]     from flask import Flask, request
[Wed May 18 14:45:01.248672 2022] [wsgi:error] [pid 63:tid 139903059884224]   File "/opt/app-root/lib64/python3.8/site-packages/flask/__init__.py", line 14, in <module>
[Wed May 18 14:45:01.248674 2022] [wsgi:error] [pid 63:tid 139903059884224]     from jinja2 import escape
[Wed May 18 14:45:01.248682 2022] [wsgi:error] [pid 63:tid 139903059884224] ImportError: cannot import name 'escape' from 'jinja2' (/opt/app-root/lib64/python3.8/site-packages/jinja2/__init__.py)

This was discovered by one of the participants in my workshop today (the only one that chose the python option). I went ran through the steps myself and hit the same problem.

Unfortunately, I don't know anything about python or I'd try to fix the issue myself and submit a PR.

As it stands, this is a blocker to completing the workshop using the python option.

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

1 participant