17420
2019-03-30 15:28
采纳率: 100%
浏览 4.3k

pytorch RuntimeError: already started

在visual studio code 中调试pytorch代码(debug)跳出错误 RuntimeError: already started

跑的是pytorch官方例子

当单步执行到

inputs, classes = next(iter(dataloaders['train']))

时候出错,错误提示如下

E00012.128: Exception escaped from start_client

            Traceback (most recent call last):
              File "/home/zeng/.vscode/extensions/ms-python.python-2019.3.6215/pythonFiles/lib/python/ptvsd/log.py", line 110, in g
                return f(*args, **kwargs)
              File "/home/zeng/.vscode/extensions/ms-python.python-2019.3.6215/pythonFiles/lib/python/ptvsd/pydevd_hooks.py", line 74, in start_client
                sock, start_session = daemon.start_client((host, port))
              File "/home/zeng/.vscode/extensions/ms-python.python-2019.3.6215/pythonFiles/lib/python/ptvsd/daemon.py", line 214, in start_client
                with self.started():
              File "/home/zeng/anaconda3/lib/python3.6/contextlib.py", line 81, in __enter__
                return next(self.gen)
              File "/home/zeng/.vscode/extensions/ms-python.python-2019.3.6215/pythonFiles/lib/python/ptvsd/daemon.py", line 110, in started
                self.start()
              File "/home/zeng/.vscode/extensions/ms-python.python-2019.3.6215/pythonFiles/lib/python/ptvsd/daemon.py", line 145, in start
                raise RuntimeError('already started')
            RuntimeError: already started

请教这是什么情况呀?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

4条回答 默认 最新

  • 17420 2019-04-01 09:06
    最佳回答

    问题解决,应该是visual studio code的问题,换一个IDE就ok

    已采纳该答案
    评论
    解决 无用
    打赏 举报
查看更多回答(3条)

相关推荐 更多相似问题