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
MIT License
163.79k stars 43.53k forks source link

strange error after pulling latest commits a few minutes ago. #326

Closed aaronr7734 closed 1 year ago

aaronr7734 commented 1 year ago

Duplicates

Steps to reproduce 🕹

run main.py. It doesn't matter whether I use --speach or --continuous.

Current behavior 😯

I receive the following errors.: Welcome back! Would you like me to return to being Entrepreneur-GPT? Continue with the last settings? Name: Entrepreneur-GPT Role: an AI designed to autonomously develop and run businesses with the sole goal of increasing your net worth. Goals: ['Increase net worth.', 'Develop and manage multiple businesses autonomously.', 'Play to your strengths as a Large Language Model.']
Continue (y/n): Traceback (most recent call last): File "/Users/jar/Auto-GPT/scripts/main.py", line 286, in memory = PineconeMemory() File "/Users/jar/Auto-GPT/scripts/config.py", line 17, in call cls._instances[cls] = super( File "/Users/jar/Auto-GPT/scripts/memory.py", line 30, in init if table_name not in pinecone.list_indexes(): File "/Users/jar/miniconda3/lib/python3.10/site-packages/pinecone/manage.py", line 185, in list_indexes response = api_instance.list_indexes() File "/Users/jar/miniconda3/lib/python3.10/site-packages/pinecone/core/client/api_client.py", line 776, in call return self.callable(self, *args, kwargs) File "/Users/jar/miniconda3/lib/python3.10/site-packages/pinecone/core/client/api/index_operations_api.py", line 1132, in __list_indexes return self.call_with_http_info(kwargs) File "/Users/jar/miniconda3/lib/python3.10/site-packages/pinecone/core/client/api_client.py", line 838, in call_with_http_info return self.api_client.call_api( File "/Users/jar/miniconda3/lib/python3.10/site-packages/pinecone/core/client/api_client.py", line 413, in call_api return self.__call_api(resource_path, method, File "/Users/jar/miniconda3/lib/python3.10/site-packages/pinecone/core/client/api_client.py", line 200, in __call_api response_data = self.request( File "/Users/jar/miniconda3/lib/python3.10/site-packages/pinecone/core/client/api_client.py", line 439, in request return self.rest_client.GET(url, File "/Users/jar/miniconda3/lib/python3.10/site-packages/pinecone/core/client/rest.py", line 236, in GET return self.request("GET", url, File "/Users/jar/miniconda3/lib/python3.10/site-packages/pinecone/core/client/rest.py", line 202, in request r = self.pool_manager.request(method, url, File "/Users/jar/miniconda3/lib/python3.10/site-packages/urllib3/request.py", line 74, in request return self.request_encode_url( File "/Users/jar/miniconda3/lib/python3.10/site-packages/urllib3/request.py", line 96, in request_encode_url return self.urlopen(method, url, extra_kw) File "/Users/jar/miniconda3/lib/python3.10/site-packages/urllib3/poolmanager.py", line 376, in urlopen response = conn.urlopen(method, u.request_uri, kw) File "/Users/jar/miniconda3/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/Users/jar/miniconda3/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, *httplib_request_kw) File "/Users/jar/miniconda3/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/Users/jar/miniconda3/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/Users/jar/miniconda3/lib/python3.10/http/client.py", line 1323, in _send_request self.putheader(hdr, value) File "/Users/jar/miniconda3/lib/python3.10/site-packages/urllib3/connection.py", line 224, in putheader _HTTPConnection.putheader(self, header, values) File "/Users/jar/miniconda3/lib/python3.10/http/client.py", line 1259, in putheader if _is_illegal_header_value(values[i]): TypeError: expected string or bytes-like object

Expected behavior 🤔

Auto-gpt should run. I wanted to make sure I didn't accidentally make a change that broke everything, so I re-cloned the repo and ran it from scratch. I also made sure all dependencies are installed and they seem to be working. It was working perfectly when I first cloned the repo about two days ago.

Your prompt 📝


# Paste your prompt here
```Name:  Entrepreneur-GPT
Role:  an AI designed to autonomously develop and run businesses with the sole goal of increasing your net worth.
Goals: ['Increase net worth.', 'Develop and manage multiple businesses autonomously.', 'Play to your strengths as a Large Language Model.']  
microchipgnu commented 1 year ago

Checkout the new .env.template

rami1207 commented 1 year ago

I am experiencing the same Traceback (most recent call last): File "/Users/ramireddy/Documents/Auto-GPT/scripts/main.py", line 286, in memory = PineconeMemory() File "/Users/ramireddy/Documents/Auto-GPT/scripts/config.py", line 17, in call cls._instances[cls] = super( File "/Users/ramireddy/Documents/Auto-GPT/scripts/memory.py", line 30, in init if table_name not in pinecone.list_indexes(): File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/pinecone/manage.py", line 185, in list_indexes response = api_instance.list_indexes() File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/pinecone/core/client/api_client.py", line 776, in call return self.callable(self, *args, kwargs) File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/pinecone/core/client/api/index_operations_api.py", line 1132, in __list_indexes return self.call_with_http_info(kwargs) File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/pinecone/core/client/api_client.py", line 838, in call_with_http_info return self.api_client.call_api( File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/pinecone/core/client/api_client.py", line 413, in call_api return self.__call_api(resource_path, method, File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/pinecone/core/client/api_client.py", line 200, in __call_api response_data = self.request( File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/pinecone/core/client/api_client.py", line 439, in request return self.rest_client.GET(url, File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/pinecone/core/client/rest.py", line 236, in GET return self.request("GET", url, File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/pinecone/core/client/rest.py", line 202, in request r = self.pool_manager.request(method, url, File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/urllib3/request.py", line 74, in request return self.request_encode_url( File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/urllib3/request.py", line 96, in request_encode_url return self.urlopen(method, url, extra_kw) File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/urllib3/poolmanager.py", line 376, in urlopen response = conn.urlopen(method, u.request_uri, kw) File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, *httplib_request_kw) File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/opt/anaconda3/lib/python3.9/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/anaconda3/lib/python3.9/http/client.py", line 1326, in _send_request self.putheader(hdr, value) File "/Users/ramireddy/Library/Caches/pypoetry/virtualenvs/auto-gpt-6pEODUcZ-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 224, in putheader _HTTPConnection.putheader(self, header, values) File "/opt/anaconda3/lib/python3.9/http/client.py", line 1262, in putheader if _is_illegal_header_value(values[i]): TypeError: expected string or bytes-like object

stmcculloch commented 1 year ago

Use the new .env.template file and add a pinecone api key: https://github.com/Torantulino/Auto-GPT#-pinecone-api-key-setup

voidxd commented 1 year ago

@stmcculloch is using pinecone mandatory now? I'm getting the same error and I'm not trying to use Pinecone and have left its' API key blank.

jantic commented 1 year ago

@stmcculloch is using pinecone mandatory now? I'm getting the same error and I'm not trying to use Pinecone and have left its' API key blank.

Yes, the old memory implementation was removed.

Airmiz commented 1 year ago

still getting error after new .eve changes any ideas?

voidxd commented 1 year ago

@Airmiz I solved it by:

  1. Creating a Pinecone account
  2. Adding the Pinecone API key and region in the .env
  3. Run Auto-GPT. Don't create an index in Pinecone manually, because Auto-GPT automatically creates one when you run it and you'll get an error that you can only have 1 index on the Pinecone starter plan.
postmrtm commented 1 year ago

went according to instructions - using the new env template and also inserted my newly created pinecone api and env params and didnt create index,, i get this error message

Traceback (most recent call last): File "H:\AutoGPT_Local\Auto-GPT\scripts\main.py", line 3, in import commands as cmd File "H:\AutoGPT_Local\Auto-GPT\scripts\commands.py", line 3, in from memory import PineconeMemory File "H:\AutoGPT_Local\Auto-GPT\scripts\memory.py", line 2, in import pinecone ModuleNotFoundError: No module named 'pinecone'

jantic commented 1 year ago

@postmrtm You'll want to install requirements.txt again via pip.

postmrtm commented 1 year ago

yep, installing requirements again solved it! thank you @jantic ! do i need to install requirements from scratch everytime i git pull? or, when do i know when i need to reinstall them?

jantic commented 1 year ago

Only when there's changes to that requirements.txt file. But when you see module not found errors like that generally that's you'd want to start.

Starchini47 commented 1 year ago

Hey everyone. I've tried all of the above but still receive the 'TypeError: expected string or bytes-like object, got 'NoneType'.

I've tried pip requirement.txt hoping that would do it but unfortunately didn't happen. I have the Pinecone API and openai API in the .env file - Any help would be greatly appreciated. My dev knowledge is Novice so apologies if this is a rudimentary problem to fix.

The readout i get is as follows:

File "/Users/apple/Downloads/ai/Auto-GPT/scripts/main.py", line 286, in <module> memory = PineconeMemory() ^^^^^^^^^^^^^^^^ File "/Users/apple/Downloads/ai/Auto-GPT/scripts/config.py", line 17, in __call__ cls._instances[cls] = super( ^^^^^^ File "/Users/apple/Downloads/ai/Auto-GPT/scripts/memory.py", line 30, in __init__ if table_name not in pinecone.list_indexes(): ^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pinecone/manage.py", line 185, in list_indexes response = api_instance.list_indexes() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pinecone/core/client/api_client.py", line 776, in __call__ return self.callable(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pinecone/core/client/api/index_operations_api.py", line 1132, in __list_indexes return self.call_with_http_info(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pinecone/core/client/api_client.py", line 838, in call_with_http_info return self.api_client.call_api( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pinecone/core/client/api_client.py", line 413, in call_api return self.__call_api(resource_path, method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pinecone/core/client/api_client.py", line 200, in __call_api response_data = self.request( ^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pinecone/core/client/api_client.py", line 439, in request return self.rest_client.GET(url, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pinecone/core/client/rest.py", line 236, in GET return self.request("GET", url, ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pinecone/core/client/rest.py", line 202, in request r = self.pool_manager.request(method, url, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/request.py", line 74, in request return self.request_encode_url( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/request.py", line 96, in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/poolmanager.py", line 376, in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1323, in _send_request self.putheader(hdr, value) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connection.py", line 224, in putheader _HTTPConnection.putheader(self, header, *values) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1259, in putheader if _is_illegal_header_value(values[i]): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got 'NoneType'

olofhh commented 1 year ago

also getting this error

Starchini47 commented 1 year ago

Ok, i don't know if this has fixed it but, I noticed that the .env file in my directory had the hidden extension of .template. So essentially it was .env.template (even though, as per instruction I'd renamed this file on installation) - I removed the .template extension so now it's just .env

The TypeError message has disappeared. However, now I'm getting the following error "Failed to connect; did you specify the correct index name?"

I've also noticed that an index has been created in PineCone so, there is a connection occuring. Researching this new error, the best answer i have so far is that someone said it can take time for the PineCone index to be setup. I don't know how true this is but, the search goes on!

Starchini47 commented 1 year ago

After waiting a few minutes... It's working!!!

olofhh commented 1 year ago

Ha funny, same! on MacOS despite me removing the .template it apparently didn't remove it. Thanks a lot!

postmrtm commented 1 year ago

having this problem again :( got the latest pull with image api!! WOOT WOOT! ran pip requirements per the last resolution and thought this would fix it, added the relevant api keys to support dalle or sd ran and now getting this error :(

PS H:\AutoGPT_Local\Auto-GPT> python scripts/main.py Traceback (most recent call last): File "H:\AutoGPT_Local\Auto-GPT\scripts\main.py", line 3, in import commands as cmd File "H:\AutoGPT_Local\Auto-GPT\scripts\commands.py", line 12, in from image_gen import generate_image File "H:\AutoGPT_Local\Auto-GPT\scripts\image_gen.py", line 4, in from PIL import Image ModuleNotFoundError: No module named 'PIL'

any thoughts anyone? what have i missed? Thank you all!

skynet01 commented 1 year ago

looks like a missing module do pip install Pillow

Torantulino commented 1 year ago

@skynet01 @postmrtm Fixed in #482.