-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Casting returns error 'total' #267
Comments
Hi @Mothamoz, can you confirm if bug persist after update to v3.6.22? |
@Darkfull-Dante just tested, exact same issue unfortunately |
If you need more information from me let me know |
@Mothamoz, is your HA instance updated also? |
Correct, running the latest version |
Can you enable debug logging for Spotcast and try again? https://github.com/fondberg/spotcast#enabling-debug-log |
Below is the result when I try to run it. Especially the last line seems weird as it works fine with Random Song/Offset turned off. Hope this helps.
|
@Mothamoz I have finally been able to find the problem. Its the URI you are using the ?si= is an added parameter that seems to be purely EU based. Spotipy (which is the dependency we use to get track information) doesn't seem to play well with it. The keys are all wrong when keeping the ?si=...
Removing everything from the In the mean time:
|
@Darkfull-Dante thank you so much for the update, I've removed the parameter from the URI as a temp fix like you suggested and that did the trick! Glad you managed to figure it out and sorry I caused you the headache in the first place 😄 |
@Mothamoz don't worry I wouldn't participate in an open source project if I didn't enjoy trying to figure these things. While composing the issue for spotipy, I seem to have figured out something. I tested on my dev env and in the first dictionary I printed, we have a key which is I think I have a way of resolving the issue from our end without modifying the uri itself, which would be ideal. If I have a potential fix, I will update this issue, but I won't close it, because it is still the Spotipy that should make sure to return consistent dictyionaries for valid URIs. |
spotipy/#758 has been open to correct this issue |
@Mothamoz v3.6.23 is available and should resolve the problem while waiting on Spotipy to accept my PR. Would you be able to confirm it is working on your end even with the get query (the ?si=[...]) |
Hi @Mothamoz, Just to fully document this situation, can you confirm how you came about that URI? Did you got it preformatted from the app or was it built from the URL (taking the link and replacing |
@Darkfull-Dante I got it the way you've described it :) In regards to it working with the new update, I can't confirm... getting a different error;
During handling of the above exception, another exception occurred:
|
That is very strange, It works on my side. Can you provide a new debug log with the error, it might help to find what is breaking |
My attempt at doing the formatting right:
|
@Mothamoz, can you confirm the exact URI you used to make the test, because the debug shows:
What I find strange is that your URI is now just |
@Darkfull-Dante errrr... I botched the copy/paste job. Okay so, on the latest spotcast/home assistant core version spotcast works fine without the '?si=' extension, but with the extension the following error comes up: grabbing logs, will edit in a minute |
@Darkfull-Dante no logs to show... it works 👯 |
ok we seem to have found the problem. Also I had some chat with the spotipy team and they seem to be more incline that the dev of the app should manage the user input, not their api. In the light of that, I'll close the issue, but I'll work on a more robust management of the URI that will do more validation. |
Description
Spotcasting my playlist to a device (through entity_id) works fine, however whenever I enable 'Random Song' or 'Offset' the service doesn't run at all and errors out saying 'total'. See logs below for more information.
Environment (please complete the following information):
LOGS:
The text was updated successfully, but these errors were encountered: