Closed rickyduh closed 5 years ago
Your error is probably the same as this one -- the meshcat-python version supplied by Drake is broken right now. If you promote the pip installed version to be earlier in your Pythonpath, or remove meshcat from the Drake binary install directory, that ought to fix this.
I'm a little new to this.. how do I promote the pip installed version to be earlier in my pythonpath?
Nuking the bad version from Drake's install will probably be easier... do you know where you installed Drake to / what your Drake installation procedure was?
Does it have something to do with this location? /opt/drake/lib/python2.7/site-packages/meshcat/servers
Should I delete the entire meshcat folder? If so, is there a way to "force" delete that folder?
It's a hacky solution that you'll have to repeat after every time you remake / reinstall Drake, but rm -rf /opt/drake/lib/python2.7/site-packages/meshcat
ought to do it. (Maybe it needs sudo depending on the permissions of /opt
?)
Great, I did that but I unfortunately still get the same error. When I Ctrl+C out, this is the error displayed:
Port: 6000 in use, trying another...
Port: 6001 in use, trying another...
Port: 6002 in use, trying another...
Port: 6003 in use, trying another...
Port: 7000 in use, trying another...
Port: 7001 in use, trying another...
Port: 7002 in use, trying another...
Port: 7003 in use, trying another...
zmq_url=tcp://127.0.0.1:6004
web_url=http://127.0.0.1:7004/static/
Firefox hook launcher starting up
run-parts: executing /usr/lib/amazon/firefox-hooks/00amazon-firefox-certs
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
run-parts: executing /usr/lib/amazon/firefox-hooks/10firefox-disable-bad-prefs
Firefox hook launcher finished
WARNING:tornado.access:404 GET /static/ (127.0.0.1) 1.66ms
WARNING:tornado.access:404 GET /favicon.ico (127.0.0.1) 0.37ms
^CTraceback (most recent call last):
File "/usr/local/bin/meshcat-server", line 11, in
Do you have any information on this? Thanks so much for your help! I've spent so long trying to troubleshoot this that I'm out of ideas.
Looks like your old instances of meshcat-server are still running (it should bind ports 6000/7000 by default), and I'm guessing you might be communicating with one of those old instances and still seeing the same issue.
Try a killall -9 meshcat-server
(or whatever the right process name is) or a logout/login loop and then try again?
Thanks for that suggestion! I am now getting this:
zmq_url=tcp://127.0.0.1:6000 web_url=http://127.0.0.1:7000/static/ Firefox hook launcher starting up run-parts: executing /usr/lib/amazon/firefox-hooks/00amazon-firefox-certs Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. Notice: Trust flag u is set automatically if the private key is present. run-parts: executing /usr/lib/amazon/firefox-hooks/10firefox-disable-bad-prefs Firefox hook launcher finished WARNING:tornado.access:404 GET /static/ (127.0.0.1) 1.37ms WARNING:tornado.access:404 GET /favicon.ico (127.0.0.1) 0.33ms
(/usr/lib/firefox/firefox:3427): Gtk-WARNING **: Theme parsing error: gtk-main.css:18:33: Invalid number for color value
and the page that opens up still has a 404 error. Do you think the problem is still with drake? Or would it be with meshcat-server?
Huh, yeah, still the same issue. Meshcat as installed through pip is pretty reliable, so I really suspect the version installed by Drake is still leaking through somewhere... what does which meshcat-server
indicate about what meshcat installation is being used? (If its direct isn't informative, it should be a plaintext python file, so you can edit it and see what it's important and figure out where that stuff lives...)
The underlying Drake issue is that the meshcat python library that's installed doesn't have the viewer
subdirectory populated, which contains the webpage details that the browser needs to serve the page.
(Also, meshcat-server itself doesn't error out, right? Just reports lots of warnings?)
It just worked!!! So, when you said it was a python file, instead of just running meshcat-server, I ran python meshcat-server and the viewer immediately popped up! Thanks so much for your help- I really appreciate it!
Oh! Maybe meshcat-server
is actually installed like a binary script (even though I think it's actually a python file with a python shbang) to a different location, and the route you're using bypasses that somehow. Anyway, glad it works! I think the upstream Drake fix will be in soon (it's a relatively simple underlying problem with Drake's build system), so hopefully you don't have to launch that way for long.
That sounds great, I'm glad we were able to resolve it in the meantime.
Whenever I run meshcat-server, and navigate to the url, I get an error 404: not sound in the url and these errors: WARNING:tornado.access:404 GET /static/ (127.0.0.1) 1.24ms WARNING:tornado.access:404 GET /favicon.ico (127.0.0.1) 0.32ms WARNING:tornado.access:404 GET /static/ (127.0.0.1) 0.65ms WARNING:tornado.access:404 GET /favicon.ico (127.0.0.1) 0.34ms in my terminal. Any advice ?