question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FileNotFoundError in running_in_docker

See original GitHub issue

Context

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

  1. Be on OSX
  2. 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:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
rogerhowardcommented, Dec 1, 2022

Having the same issue, but triggered by “zappa init” even; eg:

  1. create a virtualenv and activate it
  2. install zappa (“pip install zappa”)
  3. run “zappa init”
1reaction
hassacommented, Dec 5, 2022

@monkut it works now, thank you for the quick turnaround!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found