-
Notifications
You must be signed in to change notification settings - Fork 29
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
500 error from terminal, but 200 from browser #24
Comments
This is unusual. Your code looks fine to me.
If I were you I would try checking that requests can access other pages (eg http://localhost:5005/) to see whether the issue is with accessing the server or with the specific URL.
You could also try it with a space rather than the %20 to see if that is causing an issue.
Sent via Superhuman ( ***@***.*** )
…On Wed, Oct 13, 2021 at 02:18:41, Matthew Becker < ***@***.*** > wrote:
I'm hitting the endpoint on my raspberry pi with python trying to play a
song in the living room with the following:
r =
requests.get('http://localhost:5005/Living%20Room/applemusic/now/album:370090822')
When running in terminal I get a 500 {"status":"error"}
However when I copy the exact url and paste it into a browser it works and
I get {"status":"success"}
I am still relatively new to python so I'm hoping I didn't overlook
something obvious. But any clarification on why this would be happening
would be much appreciated.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub (
#24 ) , or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AGCVMWJLW35PA2P23CG764LUGTM7DANCNFSM5F37WJBA
).
|
After some additional troubleshooting I rebooted everything. Unplugged/and replugged in the Sonos, rebooted my wifi, and rebooted the raspberry pi. I am able to now hit
|
This is an error from the node-sonos-http-api library so I suggest you post an issue there: https://github.com/jishi/node-sonos-http-api
Sent via Superhuman ( ***@***.*** )
…On Wed, Oct 13, 2021 at 12:27:09, Matthew Becker < ***@***.*** > wrote:
After some additional troubleshooting I rebooted everything. Unplugged/and
replugged in the Sonos, rebooted my wifi, and rebooted the raspberry pi. I
am able to now hit 'http://localhost:5005/zones and get the proper response
but when I try to play any music I am now getting this 500 error
{"status":"error","error":"Got status 500 when invoking
/MediaRenderer/AVTransport/Control","stack":"Error: Got status 500 when
invoking /MediaRenderer/AVTransport/Control\n at Object.invoke
(/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/helpers/soap.js:99:10)\n
at Player.addURIToQueue
(/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/models/Player.js:616:15)\n
at /home/pi/node-sonos-http-api/lib/actions/appleMusic.js:55:50\n at
processTicksAndRejections (node:internal/process/task_queues:94:5)"}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (
#24 (comment)
) , or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AGCVMWKZNI7D6V4BLSHNHVLUGVUI3ANCNFSM5F37WJBA
).
|
Okay, I ran down that trail and did a ton of troubleshooting it seems the problem is with the r = requests.get(urltoget) if I do r=requests.get(user settings.sonoshttpaddress + '/' + sonosroom_local + '/applemusic/now/album:370090822') I've attempted trying making a new variable to isolate just the album id and double check that it is a string but that didn't work either. Is there anything else that I should be doing to get that id to play nice? or is this also being caused by node-sones-http-api? |
I'm hitting the endpoint on my raspberry pi with python trying to play a song in the living room with the following:
r = requests.get('http://localhost:5005/Living%20Room/applemusic/now/album:370090822')
When running in terminal I get a 500 {"status":"error"}
However when I copy the exact url and paste it into a browser it works and I get {"status":"success"}
I am still relatively new to python so I'm hoping I didn't overlook something obvious. But any clarification on why this would be happening would be much appreciated.
The text was updated successfully, but these errors were encountered: