Closed areeb1245 closed 1 year ago
Receiving the exact same error. Hoping someone has found a solution
Duplicates
* [x] I have searched the existing issues
Steps to reproduce joystick
Traceback (most recent call last): File "scripts/main.py", line 286, in <module> memory = PineconeMemory() File "/Users/areebpasha/Desktop/Auto GPT copy/Auto-GPT/scripts/config.py", line 17, in __call__ cls._instances[cls] = super( File "/Users/areebpasha/Desktop/Auto GPT copy/Auto-GPT/scripts/memory.py", line 30, in __init__ if table_name not in pinecone.list_indexes(): File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/manage.py", line 185, in list_indexes response = api_instance.list_indexes() File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 776, in __call__ return self.callable(self, *args, **kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api/index_operations_api.py", line 1132, in __list_indexes return self.call_with_http_info(**kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 838, in call_with_http_info return self.api_client.call_api( File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 413, in call_api return self.__call_api(resource_path, method, File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 200, in __call_api response_data = self.request( File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 439, in request return self.rest_client.GET(url, File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/rest.py", line 236, in GET return self.request("GET", url, File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/rest.py", line 202, in request r = self.pool_manager.request(method, url, File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/request.py", line 74, in request return self.request_encode_url( File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/request.py", line 96, in request_encode_url return self.urlopen(method, url, **extra_kw) File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/poolmanager.py", line 376, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/connection.py", line 239, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/opt/anaconda3/lib/python3.8/http/client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/anaconda3/lib/python3.8/http/client.py", line 1296, in _send_request self.putheader(hdr, value) File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/connection.py", line 224, in putheader _HTTPConnection.putheader(self, header, *values) File "/opt/anaconda3/lib/python3.8/http/client.py", line 1232, in putheader if _is_illegal_header_value(values[i]): TypeError: expected string or bytes-like object
Current behavior hushed
Does not produce output.
Expected behavior thinking
Should work as shown in the demo. Any assistance is greatly appreciated.
Your prompt memo
# Paste your prompt here
is your .env configured correctly? It seems to not be able to use the pinecone definitions in .env. I've noticed you seem to use Python 3.8, fairly old version (2019). The current version is 3.11 (2022).
Same issue as OP on a fresh install, like brand new 30 min ago, never used ā Pinecone API and ENV are all in .env.template from the jump and saw a bunch of fixes here that said to run requirements again, re-name .env again, -- did all this multiple times -- but still getting this...
I think all the threads on this indicate something more than user error at this point.
Traceback (most recent call last):
File "/Users/jet3004/Auto-GPT/scripts/main.py", line 286, in <module>
memory = PineconeMemory()
File "/Users/jet3004/Auto-GPT/scripts/config.py", line 17, in __call__
cls._instances[cls] = super(
File "/Users/jet3004/Auto-GPT/scripts/memory.py", line 30, in __init__
if table_name not in pinecone.list_indexes():
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/pinecone/manage.py", line 185, in list_indexes
response = api_instance.list_indexes()
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/pinecone/core/client/api_client.py", line 776, in __call__
return self.callable(self, *args, **kwargs)
File "/opt/homebrew/Caskroom/miniconda/base/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 "/opt/homebrew/Caskroom/miniconda/base/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 "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/pinecone/core/client/api_client.py", line 413, in call_api
return self.__call_api(resource_path, method,
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/pinecone/core/client/api_client.py", line 200, in __call_api
response_data = self.request(
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/pinecone/core/client/api_client.py", line 439, in request
return self.rest_client.GET(url,
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/pinecone/core/client/rest.py", line 236, in GET
return self.request("GET", url,
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/pinecone/core/client/rest.py", line 202, in request
r = self.pool_manager.request(method, url,
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/urllib3/request.py", line 74, in request
return self.request_encode_url(
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/urllib3/request.py", line 96, in request_encode_url
return self.urlopen(method, url, **extra_kw)
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/urllib3/poolmanager.py", line 376, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/http/client.py", line 1323, in _send_request
self.putheader(hdr, value)
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/urllib3/connection.py", line 224, in putheader
_HTTPConnection.putheader(self, header, *values)
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/http/client.py", line 1259, in putheader
if _is_illegal_header_value(values[i]):
TypeError: expected string or bytes-like object
Once the .env file is setup, the actual index file that Auto-GPT uses takes about 5-10 to be usable, check the Pinecone website to see when the auto-gpt index has been initialized before trying the main.py again.
Same error. There is no index created yet in my Index list at the Pinecone console. @Nnnsightnnn do we need to create manually an index in the Pinecone console? Or is it created by AutoGPT?
Im getting the same error also. Just installed and did the chefGPT prompts in the demo. I pasted the error into ChatGPT and here is what it had to say
"The error occurred in the file "main.py" at line 286, where an instance of the "PineconeMemory" class was being created. The error message suggests that there is an issue with the arguments being passed to the "putheader" method of the HTTPConnection object. Specifically, it seems that one of the values being passed is not a string or bytes-like object, which is what the method expects.
To resolve the issue, you should check the code in "memory.py" at line 30, where the "list_indexes" method is being called. It's possible that the arguments being passed to this method are incorrect or not formatted properly, causing the error.
You may also want to check the code that creates and initializes the PineconeMemory object to ensure that all necessary parameters are being passed correctly"
Hope this helps
also getting the same error!
Traceback (most recent call last):
File "C:\Users\jack\Desktop\AUTOGPT\Auto-GPT\scripts\main.py", line 286, in
C:\Users\jack\Desktop\AUTOGPT\Auto-GPT>
If you want to try an alternative to pinecone checkout my redis branch: https://github.com/BillSchumacher/Auto-GPT/tree/redis-backend
Do you have quotes around the values in the .env file? (If so, remove them - except around SMART_LLM_MODEL and FAST_LLM_MODEL)
Same error. There is no index created yet in my Index list at the Pinecone console. @Nnnsightnnn do we need to create manually an index in the Pinecone console? Or is it created by AutoGPT?
Auto-GPT creates the index automatically...it will start Thinking... once the index is initialized
Here's the issue and what I did to solve it.
Solution:
same issue and don't have a pinecone api key enabled.
@bigsk1 add your pinecone api key and environment in the .env file.
Pinecone is a hard requirement at the moment - you can't run autogpt without it
@bigsk1 add your pinecone api key and environment in the .env file.
Is it required now? Was working fine, did a git pull and now this error. Rather not have to get somehting else, already open ai api key and google search api key and search id now a pinecone api required??
Other backends will be added soon i think (Redis is being worked on, plus a possible fall back to the old in-memory store.)
Other backends will be added soon i think (Redis is being worked on, plus a possible fall back to the old in-memory store.)
Ok thank you, I have a monster server but understand some just using laptops..
By instance do you mean a pinecone index? I erased and recloned autogpt and now I'm getting that same traceback error. However, i can't find reference to any instances on pinecone. apologies if it's an absurd question, I'm 100% coding newb btw lol.
Here's the issue and what I did to solve it.
Delete any existing pinecone instances if on the free plan. There must be no pinecone instance enabled. AutoGPT automatically creates a pinecone instance. In the free plan in pinecone, only 1 database is allowed. Solution:
Delete the pinecone instance and run the code again. It worked for me.
I pulled lastest pinecone fix #440 and added pine api and regein all working now.
@areeb1245 is this still an issue for you or can this be closed?
Im still getting the same error after pulling latest.
@areeb1245 is this still an issue for you or can this be closed?
@pradley @areeb1245 please enter your pinecone api key and region in your .env
. If its still an issue, please raise a separate github issue. Thanks!
Duplicates
Steps to reproduce š¹
Traceback (most recent call last): File "scripts/main.py", line 286, in <module> memory = PineconeMemory() File "/Users/areebpasha/Desktop/Auto GPT copy/Auto-GPT/scripts/config.py", line 17, in __call__ cls._instances[cls] = super( File "/Users/areebpasha/Desktop/Auto GPT copy/Auto-GPT/scripts/memory.py", line 30, in __init__ if table_name not in pinecone.list_indexes(): File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/manage.py", line 185, in list_indexes response = api_instance.list_indexes() File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 776, in __call__ return self.callable(self, *args, **kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api/index_operations_api.py", line 1132, in __list_indexes return self.call_with_http_info(**kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 838, in call_with_http_info return self.api_client.call_api( File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 413, in call_api return self.__call_api(resource_path, method, File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 200, in __call_api response_data = self.request( File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 439, in request return self.rest_client.GET(url, File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/rest.py", line 236, in GET return self.request("GET", url, File "/opt/anaconda3/lib/python3.8/site-packages/pinecone/core/client/rest.py", line 202, in request r = self.pool_manager.request(method, url, File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/request.py", line 74, in request return self.request_encode_url( File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/request.py", line 96, in request_encode_url return self.urlopen(method, url, **extra_kw) File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/poolmanager.py", line 376, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/connection.py", line 239, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/opt/anaconda3/lib/python3.8/http/client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/anaconda3/lib/python3.8/http/client.py", line 1296, in _send_request self.putheader(hdr, value) File "/opt/anaconda3/lib/python3.8/site-packages/urllib3/connection.py", line 224, in putheader _HTTPConnection.putheader(self, header, *values) File "/opt/anaconda3/lib/python3.8/http/client.py", line 1232, in putheader if _is_illegal_header_value(values[i]): TypeError: expected string or bytes-like object
Current behavior šÆ
Does not produce output.
Expected behavior š¤
Should work as shown in the demo. Any assistance is greatly appreciated.
Your prompt š