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

Docker run return No module named 'autosub' #74

Open
h4rvey-g opened this issue Nov 26, 2022 · 1 comment
Open

Docker run return No module named 'autosub' #74

h4rvey-g opened this issue Nov 26, 2022 · 1 comment

Comments

@h4rvey-g
Copy link

I build the docker image as the instruction. It returns this error after running.

Traceback (most recent call last):
  File "./autosub/main.py", line 10, in <module>
    from autosub import logger
ModuleNotFoundError: No module named 'autosub'

I think the problem is I didn't have autosub installed in the image. So I add RUN pip3 install . to Dockerfile. Then everything works out fine.

BTW: With this solution, it's also necessary to have COPY README.md ./ in the image. Also, I have to add encoding='utf-8' in with open("README.md", "r") as fh: in setup.py, otherwise it would use ASCII encoding as default in my case.

@h4rvey-g
Copy link
Author

Another suggestion: I think it would be more elegant and concise if you can merge those "RUN pip3" steps in one RUN command.

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