Voyager
Voyager copied to clipboard
Connect to OpenAI failes: requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Briefly describe your issue
Start script from voyager import Voyager
openai_api_key = "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" # not a real key voyager = Voyager( mc_port=55555, openai_api_key=openai_api_key, ) voyager.learn()
Console logs ~/git/Voyager$ python ./voyager_sandbox.py Mineflayer process has exited, restarting Subprocess mineflayer started with PID 10170. Server started on port 3000
Traceback (most recent call last): File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen response = self._make_request( File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/urllib3/connectionpool.py", line 536, in _make_request response = conn.getresponse() File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/urllib3/connection.py", line 454, in getresponse httplib_response = super().getresponse() File "/usr/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/lib/python3.10/http/client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/urllib3/connectionpool.py", line 844, in urlopen retries = retries.increment( File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/urllib3/util/retry.py", line 470, in increment raise reraise(type(error), error, _stacktrace) File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/urllib3/util/util.py", line 38, in reraise raise value.with_traceback(tb) File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen response = self._make_request( File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/urllib3/connectionpool.py", line 536, in _make_request response = conn.getresponse() File "/home/jimm/git/privateGPT/lib/python3.10/site-packages/urllib3/connection.py", line 454, in getresponse httplib_response = super().getresponse() File "/usr/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/lib/python3.10/http/client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/foo/git/Voyager/voyager_sandbox.py", line 17, in
Please provide your python, nodejs, Minecraft, and Fabric versions here
Linux Mint 21 Python 3.10.12 Node.js v20.12.1
Minecraft 1.19.3 Fabric version 0.14.18
[If applicable] Please provide the Minefalyer and Minecraft logs, you can find the log under logs
folder
2024-04-06 22:12:35,654 - mineflayer - INFO - Stopping subprocess.
2024-04-06 22:12:36,655 - mineflayer - INFO - Starting subprocess with commands: ['node', '/home/foo/git/Voyager/voyager/env/mineflayer/index.js', '3000']
2024-04-06 22:12:37,220 - mineflayer - INFO - Server started on port 3000
2024-04-06 22:12:37,220 - mineflayer - INFO - Subprocess is ready.
2024-04-06 22:12:37,240 - mineflayer - INFO - {
2024-04-06 22:12:37,240 - mineflayer - INFO - port: 55555,
2024-04-06 22:12:37,241 - mineflayer - INFO - reset: 'hard',
2024-04-06 22:12:37,241 - mineflayer - INFO - inventory: {},
2024-04-06 22:12:37,241 - mineflayer - INFO - equipment: [],
2024-04-06 22:12:37,241 - mineflayer - INFO - spread: false,
2024-04-06 22:12:37,241 - mineflayer - INFO - waitTicks: 20,
2024-04-06 22:12:37,241 - mineflayer - INFO - position: null
2024-04-06 22:12:37,241 - mineflayer - INFO - }
2024-04-06 22:12:40,716 - mineflayer - INFO - Mineflayer detected that you are using a deprecated event (physicTick)! Please use this event (physicsTick) instead.
2024-04-06 22:12:40,741 - mineflayer - INFO - node:internal/process/promises:289
2024-04-06 22:12:40,741 - mineflayer - INFO - triggerUncaughtException(err, true /* fromPromise */);
2024-04-06 22:12:40,741 - mineflayer - INFO - ^
2024-04-06 22:12:40,741 - mineflayer - INFO -
2024-04-06 22:12:40,741 - mineflayer - INFO - AssertionError [ERR_ASSERTION]: plugin needs to be a function
2024-04-06 22:12:40,742 - mineflayer - INFO - at EventEmitter.loadPlugin (/home/foo/git/Voyager/voyager/env/mineflayer/node_modules/mineflayer/lib/plugin_loader.js:16:12)
2024-04-06 22:12:40,742 - mineflayer - INFO - at EventEmitter.
[If applicable] Please provide the GPT conversations that are printed each round.
none
Verified OPENAI_API_KEY works using OpenAI example for testing
This issue is stale because it has been open for 30 days with no activity.
I have encountered the same issues. When looking at the logs you will notice that it is related to #148 Just follow the solution by @dawn0815 and un-/comment the mentioned lines.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.