首页 > 编程语言 >【Python】Visdom:ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

【Python】Visdom:ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

时间:2024-12-25 12:27:49浏览次数:5  
标签:Visdom WinError 10061 lib py site File line packages

【Python】Visdom:ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

问题描述

Traceback (most recent call last):
  File "<PATH>\lib\site-packages\urllib3\connection.py", line 196, in _new_conn
    sock = connection.create_connection(
  File "<PATH>\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
    raise err
  File "<PATH>\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

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

Traceback (most recent call last):
  File "<PATH>\lib\site-packages\urllib3\connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "<PATH>\lib\site-packages\urllib3\connectionpool.py", line 495, in _make_request
    conn.request(
  File "<PATH>\lib\site-packages\urllib3\connection.py", line 398, in request
    self.endheaders()
  File "<PATH>\lib\http\client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "<PATH>\lib\http\client.py", line 1038, in _send_output
    self.send(msg)
  File "<PATH>\lib\http\client.py", line 976, in send
    self.connect()
  File "<PATH>\lib\site-packages\urllib3\connection.py", line 236, in connect
    self.sock = self._new_conn()
  File "<PATH>\lib\site-packages\urllib3\connection.py", line 211, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000002022D66A140>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

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

Traceback (most recent call last):
  File "<PATH>\lib\site-packages\requests\adapters.py", line 667, in send
    resp = conn.urlopen(
  File "<PATH>\lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen
    retries = retries.increment(
  File "<PATH>\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: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/caffe2torch_tripletloss (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002022D66A140>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<PATH>\lib\site-packages\visdom\__init__.py", line 756, in _send
    return self._handle_post(
  File "<PATH>\lib\site-packages\visdom\__init__.py", line 720, in _handle_post
    r = self.session.post(url, data=data)
  File "<PATH>\lib\site-packages\requests\sessions.py", line 637, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "<PATH>\lib\site-packages\requests\sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "<PATH>\lib\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "<PATH>\lib\site-packages\requests\adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/caffe2torch_tripletloss (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002022D66A140>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
Without the incoming socket you cannot receive events from the server or register event handlers to your Visdom client.

原因分析

应用程序尝试连接到运行在localhost上端口8097的Visdom服务器,但连接被拒绝。因为Visdom服务器没有运行。

Visdom 是 Facebook AI Research (FAIR) 开发的一个可视化工具,用于实时可视化数据。它特别适用于机器学习实验,允许用户创建、组织和共享数据和模型的可视化。

解决方案

在运行训练脚本之前启动Visdom服务器:

python -m visdom.server

标签:Visdom,WinError,10061,lib,py,site,File,line,packages
From: https://blog.csdn.net/qq_34988204/article/details/144632723

相关文章

  • anydesk连接提示错误win32_10061
    前言全局说明一、说明1.1环境:Windows11家庭版23H222631.3737二、错误提示2.1win32_10061解决方法:方法1:尝试开启防火墙后,添加anydesk到允许的防火墙列表中方法2:使用anydesk自带的安装,安装后,即可连接免责声明:本号所涉及内容仅供安全研究与教学使用,如......
  • Python--WinError 2 的常见解决方案
    报错信息:FileNotFoundError:[WinError2]系统找不到指定的文件。这个错误提示FileNotFoundError:[WinError2]系统找不到指定的文件说明在调用subprocess.Popen时,系统找不到指定的文件或可执行程序。在代码中,这个问题主要是因为找不到JavaJAR文件meteor-1.5.jar,也......
  • import torch OSError: [WinError 126] 找不到指定的模块。
    importtorch报错,信息如下:OSError:[WinError126]找不到指定的模块。Errorloading"C:\Anaconda3\envs\python-3.11\Lib\site-packages\torch\lib\shm.dll"oroneofitsdependencies.我的pytorch版本pipinstalltorch==2.3.0torchvision==0.18.0torchaud......
  • 如何解决"Can't connect to MySQL server on 'hostname' (10061)"问题
    当遇到"Can'tconnecttoMySQLserveron'hostname'(10061)"这类错误时,通常意味着应用程序无法连接到MySQL数据库服务器。错误代码10061通常表示连接拒绝,可能是因为服务器没有响应或者不允许来自该客户端的连接。以下是解决此类问题的一些步骤:解决方法:检查数据库服务......
  • 安装MySQL报错ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3
    今天要在本地装个mysql,发现mysql-5.7.19-winx64版总是报错由于找不到MSVCP120.dll,无法继续执行代码。重新安装程序可能会解决此问题。,去微软官网找到了最新的VisualC++RedistributableforVisualStudio,下载后发现还是不停地报错。怀疑是系统不兼容,没办法只好安装mysql-8.0.37......
  • pytorch OSError: [WinError 1114] 动态链接库(DLL)初始化例程失败”原因分析
    动态链接库失败“OSError:[WinError1114]动态链接库(DLL)初始化例程失败。Errorloading"cublas64_12.dll"oroneofitsdependencies”原因分析出错情况:在importtorch中直接被抛出异常环境探讨【问题复现】:因为使用了新的torch-gpu环境【name称为torch】,固怀疑......
  • 出现错误:[WinError 193] %1 不是有效的 Win32 应用程序
    运行python脚本时出现以下错误FailedtoinitializeWebDriverorloadconfiguration:[WinError193]%1isnotavalidWin32applicationTraceback(mostrecentcalllast):File"C:\Users\gourav\Downloads\Automation_Tool\Automation_Tool\demo.py",l......
  • OSError: [WinError 193] %1 不是有效的 Win32 应用程序
    我正在尝试使用子进程从python解释器中调用Python文件“hello.py”。但我无法解决这个错误。[Python3.4.1].importsubprocesssubprocess.call(['hello.py','htmlfilename.htm'])Traceback(mostrecentcalllast):File"<pyshell#42>",line1,in&l......
  • 使用 Selenium 时的 WebDriver 错误错误:OSError: [WinError 193] %1 不是有效的 Win32
    我正在使用文档中的代码:https://pypi.org/project/webdriver-manager/#use-with-chrome安装并升级所有软件包并运行下面的代码后:fromseleniumimportwebdriverfromselenium.webdriver.chrome.serviceimportServiceasChromeServicefromwebdriver_manager.......
  • 我收到这个错误! OSError: [WinError 193] %1 不是有效的 Win32 应用程序
    我今天尝试运行Python.exe文件并收到以下错误!有人知道什么问题以及解决它的解决方案吗?File"report-auto-final-v2.7.py",line60,in<module>File"selenium\webdriver\chrome\webdriver.py",line45,in__init__File"selenium\webdriver\chromium\we......