Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行python main.py之后出现错误 #921

Open
tinyvane opened this issue Mar 24, 2025 · 4 comments
Open

运行python main.py之后出现错误 #921

tinyvane opened this issue Mar 24, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@tinyvane
Copy link

Bug Description

$ python main.py
INFO [browser_use] BrowserUse logging setup complete with level info
INFO [root] Anonymized telemetry enabled. See https://docs.browser-use.com/development/telemetry for more information.
urllib3.exceptions.SSLError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\yiwang.venv\Lib\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\urllib3\connectionpool.py", line 841, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\urllib3\util\retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/o200k_base.tiktoken (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\yiwang\OpenManus\main.py", line 23, in
asyncio.run(main())
File "C:\Users\yiwang\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\yiwang\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 664, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\yiwang\OpenManus\main.py", line 8, in main
agent = Manus()
^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\pydantic\main.py", line 214, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang\OpenManus\app\llm.py", line 189, in new
instance.init(config_name, llm_config)
File "C:\Users\yiwang\OpenManus\app\llm.py", line 218, in init
self.tokenizer = tiktoken.encoding_for_model(self.model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\tiktoken\model.py", line 110, in encoding_for_model
return get_encoding(encoding_name_for_model(model_name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\tiktoken\registry.py", line 86, in get_encoding
enc = Encoding(**constructor())
^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\tiktoken_ext\openai_public.py", line 96, in o200k_base
mergeable_ranks = load_tiktoken_bpe(
^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\tiktoken\load.py", line 148, in load_tiktoken_bpe
contents = read_file_cached(tiktoken_bpe_file, expected_hash)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\tiktoken\load.py", line 63, in read_file_cached
contents = read_file(blobpath)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\tiktoken\load.py", line 22, in read_file
resp = requests.get(blobpath)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiwang.venv\Lib\site-packages\requests\adapters.py", line 698, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/o200k_base.tiktoken (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))

没找到是什么问题,看错误也没有什么头绪,请给一点提示,谢谢

Bug solved method

还么有找到解决办法

Environment information

  • System version: win 10
  • Python version: 3.1.2
  • OpenManus version or branch:
  • Installation method (e.g., pip install -r requirements.txt or pip install -e .): pip install -r requirements.txt

Extra information

No response

@tinyvane tinyvane added the bug Something isn't working label Mar 24, 2025
@Tchuanm
Copy link

Tchuanm commented Mar 24, 2025

解决了吗, 我也出现了相同情况。
我是使用本地部署的模型。在内网场景下使用。所以应该无法联网。
请问如何关闭联网功能呢。 我只是想尝试使用其他工具能力,撰写代码和终端运行。

@tinyvane
Copy link
Author

解决了吗, 我也出现了相同情况。 我是使用本地部署的模型。在内网场景下使用。所以应该无法联网。 请问如何关闭联网功能呢。 我只是想尝试使用其他工具能力,撰写代码和终端运行。

你好,还没有,初步怀疑是墙的问题,但是配置和全局都不行。

@tinyvane
Copy link
Author

解决了吗, 我也出现了相同情况。 我是使用本地部署的模型。在内网场景下使用。所以应该无法联网。 请问如何关闭联网功能呢。 我只是想尝试使用其他工具能力,撰写代码和终端运行。

貌似解决了,应该就是墙的问题,我使用了全局模式,刚才成功了。

Image

@entr0pia
Copy link

tiktoken.zip 下载失败, 解压后配置环境变量

TIKTOKEN_CACHE_DIR=<path_to_tiktoken>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants