SpyderRex / AutoGPT-for-Android-32-Bit

41 stars 13 forks source link

Runs but crashes upon attempting to do anything. #3

Open jayg414 opened 1 year ago

jayg414 commented 1 year ago

Got it to run with some tinkering. Had to delete the function on line 43 of prompt.py Now runs but crashes. Here is output.

~/AutoGPT-for-Android $ python3 -m autogpt -manual
ONLY THE FOLLOWING MEMORY BACKENDS ARE SUPPORTED:  ['local', 'pinecone']
Defaulting to:  pinecone
Welcome back!  Would you like me to return to being PABGPT?                                                          Asking user via keyboard...
Continue with the last settings?
Name:  PABGPT
Role:  an AI-powered personal assistant that helps you manage your daily tasks, schedule, and communication, allowing you to focus on what matters most.
Goals: ['Efficiently manage your calendar, schedule, and reminders to ensure you never miss an important appointment or deadline.', 'Streamline your communication by managing your emails, messages, and calls, and providing you with timely and relevant information.', 'Proactively identify and suggest ways to optimize your workflow and increase your productivity, such as automating repetitive tasks or delegating responsibilities.', 'Continuously learn and adapt to your preferences and habits to provide personalized and tailored assistance that meets your unique needs.', 'Maintain the highest level of confidentiality and security to protect your sensitive information and ensure your privacy.']
API Budget: infinite
Continue (y/n): y                                                                                                  PABGPT  has been created with the following details:
Name:  PABGPT
Role:  an AI-powered personal assistant that helps you manage your daily tasks, schedule, and communication, allowing you to focus on what matters most.                                                                              Goals:
-  Efficiently manage your calendar, schedule, and reminders to ensure you never miss an important appointment or deadline.
-  Streamline your communication by managing your emails, messages, and calls, and providing you with timely and relevant information.
-  Proactively identify and suggest ways to optimize your workflow and increase your productivity, such as automating repetitive tasks or delegating responsibilities.
-  Continuously learn and adapt to your preferences and habits to provide personalized and tailored assistance that meets your unique needs.
-  Maintain the highest level of confidentiality and security to protect your sensitive information and ensure your privacy.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/data/data/com.termux/files/home/AutoGPT-for-Android/autogpt/__main__.py", line 5, in <module>
    autogpt.cli.main()
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
         ^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/AutoGPT-for-Android/autogpt/cli.py", line 90, in main
    run_auto_gpt(
  File "/data/data/com.termux/files/home/AutoGPT-for-Android/autogpt/main.py", line 152, in run_auto_gpt
    memory = get_memory(cfg, init=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/AutoGPT-for-Android/autogpt/memory/__init__.py", line 20, in get_memory
    memory = PineconeMemory(cfg)
             ^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/AutoGPT-for-Android/autogpt/singleton.py", line 15, in __call__
    cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/AutoGPT-for-Android/autogpt/memory/pinecone.py", line 28, in __init__
    if table_name not in pinecone.list_indexes():
                         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pinecone/manage.py", line 185, in list_indexes
    response = api_instance.list_indexes()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pinecone/core/client/api_client.py", line 776, in __call__
    return self.callable(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/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 "/data/data/com.termux/files/usr/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 "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pinecone/core/client/api_client.py", line 413, in call_api
    return self.__call_api(resource_path, method,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pinecone/core/client/api_client.py", line 200, in __call_api
    response_data = self.request(
                    ^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pinecone/core/client/api_client.py", line 439, in request
    return self.rest_client.GET(url,
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pinecone/core/client/rest.py", line 236, in GET
    return self.request("GET", url,
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pinecone/core/client/rest.py", line 202, in request
    r = self.pool_manager.request(method, url,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urllib3/request.py", line 74, in request
    return self.request_encode_url(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urllib3/request.py", line 96, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urllib3/poolmanager.py", line 376, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/data/data/com.termux/files/usr/lib/python3.11/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/data/data/com.termux/files/usr/lib/python3.11/http/client.py", line 1324, in _send_request
    self.putheader(hdr, value)
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urllib3/connection.py", line 224, in putheader
    _HTTPConnection.putheader(self, header, *values)
  File "/data/data/com.termux/files/usr/lib/python3.11/http/client.py", line 1260, in putheader
    if _is_illegal_header_value(values[i]):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'
SpyderRex commented 1 year ago

For some reason the pinecone.list_indexes() is returning a None value. Have you created a Pinecone account, and do you have your Pinecone API key and region properly configured?

SpyderRex commented 1 year ago

As far as the other issue you mentioned, about the prompt section you had to delete, I had to add that because the agent kept trying to do searches on urls that are no good or no longer exist. But I didn't take into consideration that I am using a Google API key, and so I added an if statement to that prompt constraint, making it conditional on a user having a Google API key. For some reason it affects how the agent does its browsing. Also, thanks for the nltk mention. I forgot to add that to the requirements, as it isn't used in the original AutoGPT project.