我调用visikit frontend.py来绘制100次迭代后的奖励。
但是我得到了一个错误:
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
(flow) hao@Hao:~/rllab-multiagent/rllab/viskit$ python frontend.py ~/rllab-multiagent/data/local/hao-stabilizing-highway-0.100/hao_stabilizing_highway_0.100_2019_07_09_20_01_57_0001
Importing data from ['/home/hao/rllab-multiagent/data/local/hao-stabilizing-highway-0.100/hao_stabilizing_highway_0.100_2019_07_09_20_01_57_0001']...
Reading /home/hao/rllab-multiagent/data/local/hao-stabilizing-highway-0.100/hao_stabilizing_highway_0.100_2019_07_09_20_01_57_0001/progress.csv
Reading /home/hao/rllab-multiagent/data/local/hao-stabilizing-highway-0.100/hao_stabilizing_highway_0.100_2019_07_09_20_01_57_0001/gym_log/progress.csv
[Errno 2] No such file or directory: '/home/hao/rllab-multiagent/data/local/hao-stabilizing-highway-0.100/hao_stabilizing_highway_0.100_2019_07_09_20_01_57_0001/gym_log/progress.csv'
Done! View http://localhost:5000 in your browser
* Serving Flask app "frontend" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
Traceback (most recent call last):
File "frontend.py", line 580, in <module>
app.run(host='0.0.0.0', port=args.port, debug=args.debug)
File "/home/hao/anaconda3/envs/flow/lib/python3.5/site-packages/flask/app.py", line 990, in run
run_simple(host, port, self, **options)
File "/home/hao/anaconda3/envs/flow/lib/python3.5/site-packages/werkzeug/serving.py", line 1009, in run_simple
inner()
File "/home/hao/anaconda3/envs/flow/lib/python3.5/site-packages/werkzeug/serving.py", line 962, in inner
fd=fd,
File "/home/hao/anaconda3/envs/flow/lib/python3.5/site-packages/werkzeug/serving.py", line 805, in make_server
host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
File "/home/hao/anaconda3/envs/flow/lib/python3.5/site-packages/werkzeug/serving.py", line 698, in __init__
HTTPServer.__init__(self, server_address, handler)
File "/home/hao/anaconda3/envs/flow/lib/python3.5/socketserver.py", line 440, in __init__
self.server_bind()
File "/home/hao/anaconda3/envs/flow/lib/python3.5/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "/home/hao/anaconda3/envs/flow/lib/python3.5/socketserver.py", line 454, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use我在这里找不到这个问题。基本上,我是按照教程的说明来做的。有谁有见解吗?
发布于 2019-07-11 00:37:22
看起来您的IP地址(localhost)和端口号(5000)的组合已经被一些其他进程使用(由于OSError: [Errno 98] Address already in use)
我认为这很可能是因为多次运行frontend.py脚本,或者可能是在两个终端中运行。请关闭(“退出”)所有终端,可能等待几秒钟,然后再次运行脚本。(另外,打开你的浏览器,转到http://localhost:5000,看看有什么)
如果这不起作用,您必须查看端口5000正在使用的原因。试试这些:
https://stackoverflow.com/questions/56972967
复制相似问题