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
168.08k stars 44.35k forks source link

local cache error #698

Closed theangelomerkel closed 1 year ago

theangelomerkel commented 1 year ago

Duplicates

Steps to reproduce 🕹

Using memory of type: LocalCache Traceback (most recent call last): File "C:\WINDOWS\system32\Auto-GPT\scripts\main.py", line 318, in assistant_reply = chat.chat_with_ai( ^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\Auto-GPT\scripts\chat.py", line 67, in chat_with_ai if cfg.debug_mode: ^^^^^^^^^^^^^^ AttributeError: 'Config' object has no attribute 'debug_mode'. Did you mean: 'set_debug_mode'?

Current behavior 😯

i get the error above

Expected behavior 🤔

i get the error above

Your prompt 📝

# Paste your prompt here
blankster commented 1 year ago

In my case, the following helped (overwrites all local changes):

git reset --hard origin/master

See also #683

theangelomerkel commented 1 year ago

Thanks i ll try it out

theangelomerkel commented 1 year ago

Still same error

Ruffdraft commented 1 year ago

Getting the exact issue as @theangelomerkel.

I've installed Auto-GPT in the last 30 minutes for the first time. API for OpenAI and Elevenlabs is the only thing other that the .env file type & name change.

ewermor commented 1 year ago

Yes same error, i will investigate.

theangelomerkel commented 1 year ago

683 solved this error but got a new one

theangelomerkel commented 1 year ago

this is the new error which comes Traceback (most recent call last): File "C:\Windows\System32\Auto-GPT\scripts\main.py", line 300, in prompt = construct_prompt() ^^^^^^^^^^^^^^^^^^ File "C:\Windows\System32\Auto-GPT\scripts\main.py", line 194, in construct_prompt config.save() File "C:\Windows\System32\Auto-GPT\scripts\ai_config.py", line 72, in save with open(config_file, "w") as file: ^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied: 'C:\Windows\System32\Auto-GPT\scripts\..\ai_settings.yaml'

when i run python scripts/main.py when i run python scripts/main.py --continuous its waiting for api key and if exit with ctrl +c i get this error File "C:\Windows\System32\Auto-GPT\scripts\main.py", line 318, in assistant_reply = chat.chat_with_ai( ^^^^^^^^^^^^^^^^^^ File "C:\Windows\System32\Auto-GPT\scripts\chat.py", line 72, in chat_with_ai relevant_memory = permanent_memory.get_relevant(str(full_message_history[-5:]), 10) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Windows\System32\Auto-GPT\scripts\memory\local.py", line 102, in get_relevant embedding = get_ada_embedding(text) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Windows\System32\Auto-GPT\scripts\memory\base.py", line 9, in get_ada_embedding return openai.Embedding.create(input=[text], model="text-embedding-ada-002")["data"][0]["embedding"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\openai\api_resources\embedding.py", line 33, in create response = super().create(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\openai\api_resources\abstract\engine_apiresource.py", line 153, in create response, , api_key = requestor.request( ^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\openai\api_requestor.py", line 216, in request result = self.request_raw( ^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\openai\api_requestor.py", line 516, in request_raw result = _thread_context.session.request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\requests\adapters.py", line 489, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\http\client.py", line 1374, in getresponse response.begin() File "C:\Python311\Lib\http\client.py", line 318, in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\http\client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\socket.py", line 705, in readinto return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\ssl.py", line 1278, in recv_into return self.read(nbytes, buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\ssl.py", line 1134, in read return self._sslobj.read(len, buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ KeyboardInterrupt

ewermor commented 1 year ago

It maybe require a paid plan to access the API (even for 3.5). Could someone confirm ?

Untitled

chrismarquardt commented 1 year ago

Same (or similar) issue on macOS Ventura 13.3

Getting this after "Continue (y/n)":

Using memory of type: LocalCache
Traceback (most recent call last):
  File "/Users/xxxx/Documents/Auto-GPT/scripts/main.py", line 321, in <module>
    assistant_reply = chat.chat_with_ai(
  File "/Users/xxxx/Documents/Auto-GPT/scripts/chat.py", line 67, in chat_with_ai
    if cfg.debug:
AttributeError: 'Config' object has no attribute 'debug'
AlvsLib commented 1 year ago

This is weird and almost surely related to #695 ? I had clean-cloned twice and got the same, then modified the lines from chat.py that contain 'if cfg.debug' back to 'if cfg.debug_mode' and it works (lol).

I am a noob, so take this with the appropriate grain of salt.

chrismarquardt commented 1 year ago

I got it to work by adding one line.

Under

self.debug_mode = False I added

self.debug = False

I'm not a coder but seems usage of debug and debug_mode aren't used consistently throughout the codebase

jensonair commented 1 year ago

I got it to work by adding one line.

Under

self.debug_mode = False I added

self.debug = False

I'm not a coder but seems usage of debug and debug_mode aren't used consistently throughout the codebase

This solves it, thanks a lot!

foohonpie commented 1 year ago

I'm not a coder

you are now!

this worked for me too. ty 👍

kingofkillers91 commented 1 year ago

You mean in the config.py file? Cause in my "config.py" file those 2 variables are already set to "False!" but still getting that error. Tried both on Windows and Linux. Getting the same error on both OS

kingofkillers91 commented 1 year ago

Actually no, it worked. Thanks

BillSchumacher commented 1 year ago

PermissionError: [Errno 13] Permission denied: 'C:\Windows\System32\Auto-GPT\scripts..\ai_settings.yaml'

Don't put this in System32.

rei990 commented 1 year ago

I got it to work by adding one line.

Under

self.debug_mode = False I added

self.debug = False

I'm not a coder but seems usage of debug and debug_mode aren't used consistently throughout the codebase

thank you! it worked (^^)v

theangelomerkel commented 1 year ago

problem was that i thought the apikey of my chatgpt plus abo was enough