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

cannot run "python -m visdom.server" #874

Open
Dracilem opened this issue Oct 11, 2022 · 9 comments
Open

cannot run "python -m visdom.server" #874

Dracilem opened this issue Oct 11, 2022 · 9 comments

Comments

@Dracilem
Copy link

The error is:

/usr/local/lib/python3.7/dist-packages/visdom/server.py:38: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
ioloop.install() # Needs to happen before any tornado imports!
Checking for scripts.
Downloading scripts, this may take a little while
It's Alive!
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/dist-packages/visdom/server.py", line 2106, in
download_scripts_and_run()
File "/usr/local/lib/python3.7/dist-packages/visdom/server.py", line 2102, in download_scripts_and_run
main()
File "/usr/local/lib/python3.7/dist-packages/visdom/server.py", line 2098, in main
eager_data_loading=FLAGS.eager_data_loading)
File "/usr/local/lib/python3.7/dist-packages/visdom/server.py", line 1963, in start_server
eager_data_loading=eager_data_loading)
File "/usr/local/lib/python3.7/dist-packages/visdom/server.py", line 206, in init
self.state = self.load_state()
File "/usr/local/lib/python3.7/dist-packages/visdom/server.py", line 299, in load_state
env_jsons = [i for i in os.listdir(env_path) if '.json' in i]
FileNotFoundError: [Errno 2] No such file or directory: '/root/.visdom/'

I searched a lot, but no solution is related.

@huzippm
Copy link

huzippm commented Oct 12, 2022

D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py:41: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
ioloop.install() # Needs to happen before any tornado imports!
It's Alive!
Traceback (most recent call last):
File "D:\anaconda\envs\pytorch\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "D:\anaconda\envs\pytorch\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 2109, in
download_scripts_and_run()
File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 2105, in download_scripts_and_run
main()
File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 2096, in main
start_server(port=FLAGS.port, hostname=FLAGS.hostname, base_url=base_url,
File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 1963, in start_server
app = Application(port=port, base_url=base_url, env_path=env_path,
File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 209, in init
self.state = self.load_state()
File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 302, in load_state
env_jsons = [i for i in os.listdir(env_path) if '.json' in i]
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'C:\Users\dy/.visdom/'
me too.

@da-h
Copy link
Contributor

da-h commented Oct 14, 2022

Hey there,
could you both check if you run the most recent version, 0.2.1?

  • The errors show different line numbers here than where these lines currently are in the code.
  • Also, the current implementation should have tried to create the required paths before their use.

@Ctozzzzz
Copy link

I have the same problem. I've checked the version of visdom. It's 0.2.1, but it still couldn't work.

@da-h
Copy link
Contributor

da-h commented Oct 14, 2022

PS: I just saw that conda-forge does not use the most recent version, yet.

See:

@da-h
Copy link
Contributor

da-h commented Oct 14, 2022

Long-Term Solution:
The problem is that visdom does not check specifically if the env_path exists. The code-line of the error is the first line where the path is used.
It is probably best to give a better message about what to do in such a case. I'm willing to add a PR for this. However, I think it is best to wait for #858 to be merged or postponed before working further on the server code. However, I'll add this to my personal todo-list.


To solve the problem directly:

  • you can either specify the env_path folder you would like to use:
    visdom -env_path /tmp
    
    Though, the specified folder has to exist.
  • create the missing folder first. In the above cases it was /root/.visdom/ for @Dracilem and C:\Users\dy/.visdom/ for @huzippm.

Then, I expect the code to proceed normally.

Best,
da-h

@huangjin520
Copy link

D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py:41: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. ioloop.install() # Needs to happen before any tornado imports! It's Alive! Traceback (most recent call last): File "D:\anaconda\envs\pytorch\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\anaconda\envs\pytorch\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 2109, in download_scripts_and_run() File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 2105, in download_scripts_and_run main() File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 2096, in main start_server(port=FLAGS.port, hostname=FLAGS.hostname, base_url=base_url, File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 1963, in start_server app = Application(port=port, base_url=base_url, env_path=env_path, File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 209, in init self.state = self.load_state() File "D:\anaconda\envs\pytorch\lib\site-packages\visdom\server.py", line 302, in load_state env_jsons = [i for i in os.listdir(env_path) if '.json' in i] FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'C:\Users\dy/.visdom/' me too.

I have solved the same problem by changing the version of the Visdom--v 0.1.8.9. Maybe the last version is instability.

@da-h
Copy link
Contributor

da-h commented Oct 16, 2022

short question @huangjin520: which version did work for you?

I quickly checked the versions back to 0.1.8.4 but could not find a version where visdom -env_path /tmp/nonexistent would not yield an error.

@huangjin520
Copy link

0.1.8.9 works normally for my system.

@da-h
Copy link
Contributor

da-h commented Oct 21, 2022

Hi, there has been a new release today that should fix this error.
Feel free to check the most recent release of visdom 0.2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants