Hi John. Thank you for your response!
I cloned the Autobahn-python repo and ran the server.py file in the echo websocket example folder. I got a browser window with two buttons for sending a text and binary message. I was able to see the responses in my javascript console.
Also, if it helps, if I launch a Jupyter notebook and do a very simple script in one of its cells, I do get the interactive vpython window.
But… running the same script on a command line repl just gets me this:
And when I ctl-c, I get this:
And when I ctl-c again, I get this and the repl exits:
I do want to be able to use the Raspberry Pi as the webserver serving the vpython though so I can view it from any device, so installing vpython on the client devices won’t be an option, unfortunately.
Tyson
I also run a tcpdump on the loopback interface. It seems after a few back and forth, the server was waiting for 5 hours before client sending stuff, then the process was completed in a few seconds.
--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vpython-users/a796d7f9-4343-457b-b0f2-d94f5c0b0085n%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/9EruHyzn9DI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vpython-users/db7dbb28-0e06-460c-9b90-ce15f1befd4bn%40googlegroups.com.
Hi John,
I actually tried the script with the rate previously as well to no avail. Just ran it again (not from a repl, but from a test.py file) and still getting the same result. I have to run it from a test.py file because as soon as I enter “sphere()” on the repl, it clears the screen and presents that “waiting for response” message. I can’t type in any more code to enter the while loop with the rate.
I did some of those examples from that link before too and all had the same result. That’s when I googled some more and found this google groups thread.
I noticed that when I try to run any of the code from the command line and it says “waiting for response,” I don’t see any new services listening in “netstat -l” like I do when I run it from a Jupyter notebook. Should I see a new server listening on any certain port while the app is running from the cli?
To view this discussion visit https://groups.google.com/d/msgid/vpython-users/7be4c658-289f-4316-8c76-443675b90e1en%40googlegroups.com.
Oh sorry to mention that yes, the glowscript test with webvpython also does work. So both Jupyter and webvpython are working, but running from repl or by launching a simple test.py script do not work.
From: vpytho...@googlegroups.com <vpytho...@googlegroups.com> On Behalf Of John
Sent: Friday, March 7, 2025 10:52 AM
To view this discussion visit https://groups.google.com/d/msgid/vpython-users/7be4c658-289f-4316-8c76-443675b90e1en%40googlegroups.com.
Interesting. I just wrote the four-line script including the rate in the Thonny IDE on my Raspberry Pi and it did, in fact, work when I pressed the “Run” button. The browser launched and displayed the sphere. And if you want to hear something even more interesting, I tried running just the two-line script without the rate directly in the repl shell within the Thonny app and that worked as well. The moment I entered “sphere()”, the browser launched and the sphere appeared. Furthermore, to make it even more confusing, the Thonny repl shell is using the same virtual environment that I’m using when trying to run it from the repl via a Linux terminal.
So something about running it directly from the OS’s command line repl isn’t working even in the same virtual environment.
To view this discussion visit https://groups.google.com/d/msgid/vpython-users/09d3bd83-391e-486a-9153-2c1f0e9c5f5an%40googlegroups.com.
Right, but even when I create a test.py script that includes the rate and run it from the CLI with “python test.py”, I still get the same result.
Running this doesn’t work from the Linux terminal. It also just hangs on “HTTP request sent. Waiting for response.”:
To view this discussion visit https://groups.google.com/d/msgid/vpython-users/07c058f0-b867-4116-8273-bfb8b8746da6n%40googlegroups.com.
Thank you for the info and for all your time, John.
After the most recent tests, I figured it was probably something to do with the OS running on the Pi as well. When I get some time, I’ll play around with things to see if I can get it working. I’ll also explore those other options you mentioned more.
If I do end up figuring out what the issue is in code, I’ll be sure to post a solution in case anyone else runs into the same thing.
Thank you again!!!
To view this discussion visit https://groups.google.com/d/msgid/vpython-users/1e7c7e09-9b47-44cb-961d-5aecaa717e03n%40googlegroups.com.