FileNotFoundError in running_in_docker
See original GitHub issueContext
In running_in_docker
if there is no /proc/1/cgroup
, like on OSX for example, a FileNotFoundError is raised and zappa can’t be imported.
We do some stuff with SQS and zappa’s asynchronous tasks so we import zappa even during dev.
Expected Behavior
FileNotFoundError should be caught and running_in_docker should return False.
Actual Behavior
A FileNotFoundError is raised.
Possible Fix
FileNotFoundError should be caught and running_in_docker should return False.
Steps to Reproduce
- Be on OSX
- import zappa
Your Environment
- Zappa version used: 0.56.0
- Operating System and Python version: OSX 12.6, Python 3.9 and 3.11.0
- The output of
pip freeze
: - Link to your project (optional):
- Your
zappa_settings.json
:
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:5
Top Results From Across the Web
FileNotFoundError in custon docker python image
This works fine when I execute the python code. But I want to run it as a docker so I have converted it...
Read more >FileNotFoundError: [Errno 2] No such file or directory: '/usr/src ...
Try running the image with a shell and check what is going on. docker run --rm -it you-docker-image bash.
Read more >30647 ([FATAL] FileNotFoundError with runserver command ...
Trying to run the development server in a container with volume-mounted source is throwing a FileNotFoundError. I've verified that the issue is consistently ......
Read more >File not found(unable to read model)FileNotFoundError: [Errno ...
Hi all, my docker file: FROM python:3.7.3-slim RUN pip install --upgrade pip WORKDIR /app COPY . /app RUN pip install requirements.txt CMD ...
Read more >FileNotFoundError: [Errno 2] No such file or directory when a ...
Related Query · FileNotFoundError: [Errno 2] No such file or directory when a task tried to save a file · When run docker-compose...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Having the same issue, but triggered by “zappa init” even; eg:
@monkut it works now, thank you for the quick turnaround!