Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
Other
167.6k stars 44.27k forks source link

Docker execution - ModuleNotFoundError: No module named 'openapi_python_client' #2634

Closed 70nyIT closed 1 year ago

70nyIT commented 1 year ago

⚠️ Search for existing issues first ⚠️

Which Operating System are you using?

Docker

GPT-3 or GPT-4?

GPT-3.5

Steps to reproduce 🕹

.env file

################################################################################
### AUTO-GPT - GENERAL SETTINGS
################################################################################
EXECUTE_LOCAL_COMMANDS=True
BROWSE_CHUNK_MAX_LENGTH=8192
BROWSE_SUMMARY_MAX_TOKEN=300
AI_SETTINGS_FILE=ai_settings.yaml

################################################################################
### LLM PROVIDER
################################################################################

### OPENAI
OPENAI_API_KEY=**{I-place-my-api-key-here}**
TEMPERATURE=0
USE_AZURE=False

################################################################################
### LLM MODELS
################################################################################

SMART_LLM_MODEL=gpt-4
FAST_LLM_MODEL=gpt-3.5-turbo

### LLM MODEL SETTINGS
FAST_TOKEN_LIMIT=4000
SMART_TOKEN_LIMIT=8000

################################################################################
### MEMORY
################################################################################

### MEMORY_BACKEND - Memory backend type
MEMORY_BACKEND=local

### PINECONE
PINECONE_API_KEY=your-pinecone-api-key
PINECONE_ENV=your-pinecone-region

### REDIS
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
WIPE_REDIS_ON_START=False
MEMORY_INDEX=auto-gpt

### WEAVIATE
WEAVIATE_HOST="127.0.0.1"
WEAVIATE_PORT=8080
WEAVIATE_PROTOCOL="http"
USE_WEAVIATE_EMBEDDED=False
WEAVIATE_EMBEDDED_PATH="/home/me/.local/share/weaviate"
WEAVIATE_USERNAME=
WEAVIATE_PASSWORD=
WEAVIATE_API_KEY=
MEMORY_INDEX=AutoGpt

### MILVUS
MILVUS_ADDR=your-milvus-cluster-host-port
MILVUS_COLLECTION=autogpt

################################################################################
### IMAGE GENERATION PROVIDER
################################################################################

### OPEN AI
IMAGE_PROVIDER=dalle

### HUGGINGFACE
HUGGINGFACE_API_TOKEN=your-huggingface-api-token

################################################################################
### AUDIO TO TEXT PROVIDER
################################################################################

### HUGGINGFACE
HUGGINGFACE_AUDIO_TO_TEXT_MODEL=facebook/wav2vec2-base-960h

################################################################################
### GIT Provider for repository actions
################################################################################

### GITHUB
GITHUB_API_KEY=**{I-place-my-api-key-here}**
GITHUB_USERNAME=70nyIT

################################################################################
### SEARCH PROVIDER
################################################################################

### GOOGLE
GOOGLE_API_KEY=**{I-place-my-api-key-here}**
CUSTOM_SEARCH_ENGINE_ID=**{I-place-my-search-enginge-id-here}**

################################################################################
### TTS PROVIDER
################################################################################

### MAC OS
USE_MAC_OS_TTS=False

### STREAMELEMENTS
USE_BRIAN_TTS=False

### ELEVENLABS
ELEVENLABS_API_KEY=your-elevenlabs-api-key
ELEVENLABS_VOICE_1_ID=your-voice-id-1
ELEVENLABS_VOICE_2_ID=your-voice-id-2

################################################################################
### TWITTER API 
################################################################################

TW_CONSUMER_KEY=
TW_CONSUMER_SECRET=
TW_ACCESS_TOKEN=
TW_ACCESS_TOKEN_SECRET=

Current behavior 😯

The build completes, but this error is shown when the docker run command is executed

Warning: The file 'AutoGpt.json' does not exist. Local memory would not be saved to a file.
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 "/home/appuser/autogpt/__main__.py", line 5, in <module>
    autogpt.cli.main()
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/appuser/autogpt/cli.py", line 83, in main
    from autogpt.plugins import scan_plugins
  File "/home/appuser/autogpt/plugins.py", line 12, in <module>
    import openapi_python_client
ModuleNotFoundError: No module named 'openapi_python_client'

Expected behavior 🤔

Should launch correctly the Auto-GPT terminal, ready to create the first task.

Your prompt 📝

- does not apply -

Your Logs 📒

Warning: The file 'AutoGpt.json' does not exist. Local memory would not be saved to a file.
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 "/home/appuser/autogpt/__main__.py", line 5, in <module>
    autogpt.cli.main()
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/appuser/autogpt/cli.py", line 83, in main
    from autogpt.plugins import scan_plugins
  File "/home/appuser/autogpt/plugins.py", line 12, in <module>
    import openapi_python_client
ModuleNotFoundError: No module named 'openapi_python_client'
yslinear commented 1 year ago

2609

egonm12 commented 1 year ago

Are you using master or stable? It only happens on master for me. As described in the readme, don't use master.

70nyIT commented 1 year ago

@egonm12 to clone I'm using the command in the REAMDE

git clone https://github.com/Significant-Gravitas/Auto-GPT.git

If the stable branch is required (makes sense to me), maybe should also be updated that command in the docs?

70nyIT commented 1 year ago

Confirm that this happens only in master and not stable

egonm12 commented 1 year ago

@70nyIT good suggestion!

https://github.com/Significant-Gravitas/Auto-GPT/pull/2667

deb999983 commented 1 year ago

I think this issue is because of a command in Dockerfile, this command

RUN sed -i '/Items below this point will not be included in the Docker Image/,$d' requirements.txt && \
    pip install --no-cache-dir --user -r requirements.txt

, appears to remove the openapi_python_client dependency.

Fix maybe to just move the dependency above this line,

openapi-python-client==0.13.4

# Items below this point will not be included in the Docker Image

in requirements.txt.

github-actions[bot] commented 1 year ago

This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.

github-actions[bot] commented 1 year ago

This issue was closed automatically because it has been stale for 10 days with no activity.