AutoGPT: ModuleNotFoundError: No module named 'scripts'
⚠️ Search for existing issues first ⚠️
- I have searched the existing issues, and there is no existing issue for my problem
Which Operating System are you using?
Docker
Which version of Auto-GPT are you using?
Stable (branch)
GPT-3 or GPT-4?
GPT-3.5
Steps to reproduce 🕹
Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal
Docker version 23.0.5, build bc4487a
$ docker pull significantgravitas/auto-gpt
REPOSITORY TAG IMAGE ID CREATED SIZE significantgravitas/auto-gpt latest a1e88fe207ec 3 hours ago 1.65GB redis/redis-stack-server latest 0021013ed7f6 8 days ago 329MB
Current behavior 😯
Traceback (most recent call last): File “/usr/local/lib/python3.10/runpy.py”, line 196, in _run_module_as_main return _run_code(code, main_globals, None, File “/usr/local/lib/python3.10/runpy.py”, line 86, in _run_code exec(code, run_globals) File “/app/autogpt/main.py”, line 5, in <module> autogpt.cli.main() File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1130, in call return self.main(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1055, in main rv = self.invoke(ctx) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1635, in invoke rv = super().invoke(ctx) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 760, in invoke return __callback(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/click/decorators.py”, line 26, in new_func return f(get_current_context(), *args, **kwargs) File “/app/autogpt/cli.py”, line 87, in main from autogpt.main import run_auto_gpt File “/app/autogpt/main.py”, line 22, in <module> from scripts.install_plugin_deps import install_plugin_dependencies ModuleNotFoundError: No module named ‘scripts’
Expected behavior 🤔
No response
Your prompt 📝
# Paste your prompt here
Your Logs 📒
<insert your logs here>
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 18
- Comments: 27 (8 by maintainers)
For anyone wondering the exact steps to fix your install right now :
Thanks @prom3theu5 for the instructions 😃
Even easier than rebuilding docker image, you could just edit docker-compose.yaml and map the scripts and plugins directory. i.e. add
- ./scripts:/app/scripts
I am having same issue. It seems that the docker image is not made correctly as it doesn’t seem to have all the files that exist in stable in /app or /app/autogpt
You’re very welcome
Aye there was a merge conflict as another pr went in that updated the docker file with the scripts folder too (which is in master and not my pr anymore as that was conflicted)
basically you need to also add
ONBUILD COPY scripts/ ./scripts
Same place as you added plug-insit’s already merged into master that line, but that was after 0.3.0 and after my original comments here ^^, so release won’t have that
literally followed the tutorial:
docker pull significantgravitas/auto-gpt
docker-compose run --rm auto-gpt
same error
No idea tbh ^^. They have a lot of open PRs
What I would do is take the source download from the 0.3.0 release here: https://github.com/Significant-Gravitas/Auto-GPT/releases/tag/v0.3.0 And add in the two lines in my PR to the dockerfile - then just do
docker(/podman) build -t <desired_tag> .
from within the extracted folder. That way you can patch yourself while you wait and just build the container locallyPowerShell in a python repository! Blasphemy!
With that said, let me grab that fellow PowerShell user.
Took a while to build but solved my issue 👍 . Thanks!
For all you windows / powershell people out there.
5.Fix the dockerfile:
7. Fix your docker-compose
The story seems to continue (significantgravitas/auto-gpt latest bdbf2bfcb8de):
File "/app/autogpt/main.py", line 64, in run_auto_gpt motd, is_new_motd = get_latest_bulletin() File "/app/autogpt/utils.py", line 130, in get_latest_bulletin open("data/CURRENT_BULLETIN.md", "w", encoding="utf-8").write(new_bulletin) FileNotFoundError: [Errno 2] No such file or directory: 'data/CURRENT_BULLETIN.md'
same issue…
Worked like a charm. Thank you!
Thanks for being so responsive, would you happen to know what the process is now? When can we expect the image to reflect those changes?