Closed RobDiek closed 9 months ago
Hello! the browser is opening? In that step, you're supposed to give the app permissions from the lastfm website. A browser will pop up with the authorization URL.
yes this is exactly what I do I get lastfm access request - click on "Yes" and it says "authentication okay" in browser but gives me error in terminal
you can see it here (ignore background please, was watching a video and didnt relaize it was recording sound :D ) https://youtu.be/MjqcgDY6Eqk?t=15
ok try putting the lastfm token hardcoded here like this:
if not self.session:
# token = self.get_token()
token = "YOUR_TOKEN_HERE"
self.session = self.get_session(token)
this is the token you need to paste:
let's see if that works
You know what, I can see the error
that means there's a problem with your LAST_FM_API_SECRET
. It's set correctly?
its the shared API secret right? yeah, double checked it and just created a new one to be sure - both key and secret are correct.
Yes. try to print
the params here: https://github.com/luisignaciocc/youtube-music-scrobbler/blob/master/lastpy/__init__.py#L15-L24
To see if everything is ok
interesting after a restart it works but it now shows "0 scrobbles" is it because I have way more then 200 scrobbles ?
ah wait, seems it only gets the plays of the device the script is ran on? when i start one song it gives me back 1 scrobble but the rest of all my other devices isnt synced even though I have the listening history visible. must be my thing then. Thanks! :)
no no, it scrobbles from all the devices. it just scrobbles the recently played songs, so history older than 1 day will not be scrobbled
ah I see. hmm i need this for like the last 365 days :D thanks for this though! :)
Hi seems the session getting doesnt work :(
Waiting for authentication ... 127.0.0.1 - - [10/0ct/2023 13:23: 42] "GET /?token=XXXXXXXXXXXXXXXXXXXXXXXHTTP/1.1" 200 - Getting session ... <? xml version="1.0" encoding="UTF-8"?>
Traceback (most recent call last): File "/home/robin/Downloads/youtube-music-scrobbler/start.py", line 89, in get_session token = root. find('session/key'). text AttributeError: 'NoneType' object has no attribute 'text' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/robin/Downloads/youtube-music-scrobbler/start.py", line 153, in
Process() .execute()
File "/home/robin/Downloads/youtube-music-scrobbler/start.py", line 101, in execute
self.session = self.get_session(token)
File "/home/robin/Downloads/youtube-music-scrobbler/start.py", line 94, in get_session
raise Exception(e)
Exception: 'NoneType' object has no attribute 'text'
any idea what to do? :)