During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/anaconda3/envs/python3812/lib/python3.8/site-packages/visdom/__init__.py", line 756, in _send return self._handle_post( File "/opt/anaconda3/envs/python3812/lib/python3.8/site-packages/visdom/__init__.py", line 720, in _handle_post r = self.session.post(url, data=data) File "/opt/anaconda3/envs/python3812/lib/python3.8/site-packages/requests/sessions.py", line 635, in post return self.request("POST", url, data=data, json=json, **kwargs) File "/opt/anaconda3/envs/python3812/lib/python3.8/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/opt/anaconda3/envs/python3812/lib/python3.8/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/opt/anaconda3/envs/python3812/lib/python3.8/site-packages/requests/adapters.py", line 520, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /events (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7914dcbe20>: Failed to establish a new connection: [Errno 61] Connection refused'))
时间: 2023-10-10 16:05:21 浏览: 373
PL/SQL经典开发手册
这错误是由于在处理上面的异常时,另一个异常发生了。根据错误信息,看起来是在使用visdom库时出现了连接错误。这个错误是由于无法建立与本地主机(localhost)的连接引起的,具体原因可能是因为没有运行相应的服务或者端口被占用。
要解决这个问题,你可以尝试以下几个步骤:
1. 确保你已经正确安装了visdom库,并且已经启动了相应的服务。你可以通过命令行输入`python -m visdom.server`来启动visdom服务。
2. 检查端口8097是否被其他应用程序占用。你可以使用命令行工具(如netstat)来检查该端口的占用情况,并尝试释放该端口。
3. 确保你的网络环境正常,防火墙没有阻止连接。
如果以上步骤都没有解决问题,建议你查看visdom库的文档或在相关论坛上寻求帮助,以获取更详细的故障排除步骤和解决方案。
阅读全文