Closed Alistair1231 closed 8 months ago
There's two errors here. One is from mpv (JSONDecodeError
) and the other (TypeError
) is my fault. If the second error hadn't been there, we would've been able to figure out the actual error from mpv 😅.
So for now I'll push a fix for this and you can keep a lookout for the first error (mpv probably sent some weird info).
perfect. I am on the new beta (Trakts version 1.3.0-beta.1) now and started a log file for mpv. When I encounter new errors I will post it here.
I have another error.
2021-06-25 15:14:13,826 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.00% for Marvel's Agents of S.H.I.E.L.D.
2021-06-25 15:14:14,297 - INFO - scrobbler - scrobbler - Scrobble start successful for Marvel's Agents of S.H.I.E.L.D. S01E22
2021-06-25 15:56:56,761 - DEBUG - mpv - monitor - action=scrobble
2021-06-25 15:56:56,770 - DEBUG - mpv - monitor - {'state': 0, 'progress': 98.6, 'media_info': {'type': 'episode', 'title': "Marvel's Agents of S.H.I.E.L.D.", 'season': 1, 'episode': 22}, 'updated_at': 1624629416.75288}
2021-06-25 15:56:56,771 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 98.60% for Marvel's Agents of S.H.I.E.L.D.
2021-06-25 15:56:56,775 - DEBUG - mpv - mpv - Pipe closed.
2021-06-25 15:56:56,907 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-06-25 15:56:57,517 - INFO - scrobbler - scrobbler - Scrobble stop successful for Marvel's Agents of S.H.I.E.L.D. S01E22
2021-06-25 16:00:37,078 - ERROR - mpv - mpv - Error with command ['get_property', 'time-pos']. Response: {'request_id': 86107, 'error': 'property unavailable'}
2021-06-25 16:00:37,081 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 86109, 'error': 'property unavailable'}
2021-06-25 16:00:37,082 - ERROR - mpv - mpv - Error with command ['get_property', 'duration']. Response: {'request_id': 86110, 'error': 'property unavailable'}
2021-06-25 16:00:37,776 - ERROR - mpv - __init__ - Unhandled exception
Traceback (most recent call last):
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook
run_original(*args2, **kwargs2)
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 80, in run
self.conn_loop()
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 331, in conn_loop
self.on_line(line)
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 174, in on_line
mpv_json = json.loads(line)
File "c:\program files\python39\lib\json\__init__.py", line 341, in loads
s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 1: invalid start byte
I watched Marvel's Agents of S.H.I.E.L.D. S01E22 locally (rclone mount) and it scrobbled succesfully. Then I switched over to Syncplay for S02E01 (http) and it broke. This happend after some restarts and whitelisting etc.:
Traceback (most recent call last):
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook
run_original(*args2, **kwargs2)
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 80, in run
self.conn_loop()
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 295, in conn_loop
self.file_handle = win32file.CreateFile(
pywintypes.error: (231, 'CreateFile', 'All pipe instances are busy.')
2021-06-25 16:09:38,767 - DEBUG - MainThread - notifier - Notifications enabled for categories: exception, misc, scrobble.pause, scrobble.resume, scrobble.start, scrobble.stop, trakt
2021-06-25 16:09:38,929 - INFO - MainThread - scrobbler - Started scrobbler thread.
2021-06-25 16:09:38,943 - INFO - MainThread - monitor - Started monitor for mpv
2021-06-25 16:09:38,961 - DEBUG - mpv - file_info - Raw filepath 'http://192.168.195.232/Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv'
2021-06-25 16:09:38,961 - DEBUG - mpv - file_info - Converted to url 'http://192.168.195.232/Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv'
2021-06-25 16:09:38,961 - INFO - mpv - file_info - File path not in whitelist.
2021-06-25 16:11:11,009 - DEBUG - MainThread - notifier - Notifications enabled for categories: exception, misc, scrobble.pause, scrobble.resume, scrobble.start, scrobble.stop, trakt
2021-06-25 16:11:11,178 - INFO - MainThread - scrobbler - Started scrobbler thread.
2021-06-25 16:11:11,193 - INFO - MainThread - monitor - Started monitor for mpv
2021-06-25 16:11:11,208 - DEBUG - mpv - file_info - Raw filepath 'http://192.168.195.232/Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv'
2021-06-25 16:11:11,208 - DEBUG - mpv - file_info - Converted to url 'http://192.168.195.232/Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv'
2021-06-25 16:11:11,208 - DEBUG - mpv - file_info - Matched whitelist entry 'http://192.168.195.232/'
2021-06-25 16:11:11,504 - DEBUG - mpv - file_info - Guess: MatchesDict([('title', '192 168 195 232'), ('season', 2), ('episode_title', "Marvel's Agents of S.H.I.E.L.D."), ('episode', 1), ('screen_size', '1080p'), ('color_depth', '10-bit'), ('source', 'Blu-ray'), ('audio_codec', 'AAC'), ('audio_channels', '5.1'), ('video_codec', 'H.265'), ('video_profile', 'High Efficiency Video Coding'), ('release_group', 'Vyndros_Track02'), ('container', 'mkv'), ('mimetype', 'video/x-matroska'), ('type', 'episode')])
2021-06-25 16:11:11,505 - DEBUG - mpv - monitor - action=scrobble
2021-06-25 16:11:11,505 - DEBUG - mpv - monitor - {'state': 1, 'progress': 0.67, 'media_info': {'type': 'episode', 'title': '192 168 195 232', 'season': 2, 'episode': 1}, 'updated_at': 1624630271.5055656}
2021-06-25 16:11:11,505 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 0.67% for 192 168 195 232
2021-06-25 16:11:11,511 - DEBUG - scrobbler - trakt_interface - Searching trakt: Title: "192 168 195 232"
2021-06-25 16:11:12,084 - WARNING - scrobbler - trakt_interface - Trakt search yielded no results for the show, 192 168 195 232
2021-06-25 16:11:12,085 - DEBUG - scrobbler - trakt_interface - Trakt ID: -1
2021-06-25 16:11:12,086 - WARNING - scrobbler - trakt_interface - Invalid trakt id for 192 168 195 232
2021-06-25 16:11:12,086 - WARNING - scrobbler - scrobbler - Scrobble unsuccessful.
Apart from the other crashes, it seems the name wasn't recognized properly this time...
This is the filename:
Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv
I don't think it matters, but I hosted the http with caddy:
First, I recommend updating to the master branch (beta version is old):
trakts stop
pipx install --force git+https://github.com/iamkroot/trakt-scrobbler.git@master
trakts start
Then, try to again play the file that caused the first issue (UnicodeDecodeError
), and send the logs for that.
Regarding the second issue (wrong title), that's a bug in the current parser. Will make a separate issue for this.
I updated to main and it seems fine again, apart from the issue https://github.com/iamkroot/trakt-scrobbler/issues/125#issuecomment-868985158
The UnicodeDecodeError seems to come only sometimes and is hard to reproduce. I will post about it if/when it comes up again.
EDIT: Since this https://github.com/iamkroot/trakt-scrobbler/issues/125#issuecomment-868985158 issue only appears when opened via http, which was when the bug appeared, maybe that was the problem after all. That something about how http represents symbols like quotes screwed with the parsing? If you think that might be it just close this.
Since this #125 (comment) issue only appears when opened via http, which was when the bug appeared, maybe that was the problem after all. That something about how http represents symbols like quotes screwed with the parsing?
Probably not an http thing, the error is originating in MPV Monitor when communicating with the player. It may be due to a weird symbol, but I'd like to get to the bottom of this.
Alright. I will keep my eyes open and will post here if it happens again.
It happened again. Weirdly enough it still says something about unicode even though I installed this version https://github.com/iamkroot/trakt-scrobbler/commit/afe8171d8688f5cb7cdb4e44ceaec37066fcddb9 from master. Here is the log:
2021-06-27 23:11:46,996 - INFO - scrobbler - scrobbler - Scrobble stop successful for Marvel's Jessica Jones S01E10
2021-06-28 17:46:10,695 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 11427, 'error': 'property unavailable'}
2021-06-28 17:46:13,840 - ERROR - mpv - __init__ - Unhandled exception
Traceback (most recent call last):
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook
run_original(*args2, **kwargs2)
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 80, in run
self.conn_loop()
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 334, in conn_loop
self.on_line(line)
File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 176, in on_line
mpv_json = json.loads(line)
File "c:\program files\python39\lib\json\__init__.py", line 341, in loads
s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x86 in position 24: invalid start byte
Here is the mpv log (places with a lot of dots were trimmed since it repeated a lot in idle): It was too long for a comment so here is a pastebin
Hmm that doesn't help a lot. I've added some code to catch and log the raw data when the error occurs occurs. Could you please try installing this:
trakts stop
pipx install --force git+https://github.com/iamkroot/trakt-scrobbler.git@mpv_debug
trakts start
alright done. Will update once errors occur
Hmm that doesn't help a lot. I've added some code to catch and log the raw data when the error occurs occurs. Could you please try installing this:
1. Stop the scrobbler with `trakts stop` 2. Run `pipx install --force git+https://github.com/iamkroot/trakt-scrobbler.git@mpv_debug` 3. Start scrobbler with `trakts start`
alright done. Will update once errors occur
you might have inadvertently fixed it? I wasn't having any issues anymore. I just wanted to give an update letting you know I did use it and it was fine.
However if something happens I will update
Hmm very weird. For now, you should just install v1.3.0 and we'll deal with this if it comes up again
Hi! I'm on 1.3.2 right now and encountered an error again. I was running in mpv using a m3u playlist with urls, which I manage using mpv-playlistmanager. Here is the log
2021-10-08 21:38:04,424 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 2677, 'error': 'property unavailable'}
2021-10-08 21:38:31,781 - WARNING - mpv - mpv - Invalid JSON received. Skipping.
Traceback (most recent call last):
File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 176, in on_line
mpv_json = json.loads(line)
File "c:\program files\python39\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "c:\program files\python39\lib\json\decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)
2021-10-08 21:38:31,806 - DEBUG - mpv - mpv - b'2021-10-08 20:43:01\x00"reason":"quit","playlist_entry_id":6}'
2021-10-08 21:38:31,807 - DEBUG - mpv - mpv - Pipe closed.
2021-10-08 21:38:31,807 - WARNING - mpv - mpv - Incomplete media status info
2021-10-08 21:38:32,822 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
As always a restart with trakts stop; trakts start
and everything works again.
Just to verify, you're running mpv directly, or via smplayer?
I guess this is most likely a quirk of that playlist manager script and how it interacts with the mpv end-file event. I suspect that it inserts a newline char (\n
) somewhere in the ID, and this breaks our JSON parsing (sometimes), which assumes that if we hit a newline, the json record is complete. Just a hunch, will have to test further.
edit: that might not be the case. I see that there's a \x00
just before the "reason"
field. This isn't valid json, even if the lua script added a newline somewhere. This seems more like an mpv bug. Again, need to reproduce this reliably.
I use mpv directly and I'm using windows. I installed mpv via chocolatey and am on version v2020.12.06. Is there a reason why the program just quits after finding this error? I'd rather that the scrobbling of the one episode fails rather than noticing the scrobbler crashed multiple episodes in, tbh.
Is there a reason why the program just quits after finding this error?
If you look carefully, the program hasn't crashed. After you originally raised the bug report, I added logic such that it would log a warning+exception traceback (to figure out exactly which line is giving error), but it would ignore the malformed input and move on. You can see Pipe closed
message, meaning it has terminated the connection with MPV. The monitor would now go into the dormant state.
If you did play a new file, it should have recognized the new episodes. If not, that suggests a deeper issue in the connection between mpv and our app.
Are there any more log messages after the snippet you posted above (ie, after Unable to connect to MPV
)? I would expect that the next time mpv is started, our monitor would re-connect to it.
Are you actually closing MPV at the end of the file, or just moving to the next file in the playlist?
Ohhh ok. That might have been exactly what happened. Maybe I caught it exactly as it happened and restarted the scrobbler and mpv, where mpv would've been enough! I thought it already crashed after Episode 7 of Squid Game since it didn't update on trakt, but it the log looks like only crashed after episode 9, and at least up until episode 8 it should have been completed, but on trakt they aren't. Maybe I closed the episode too early because of the long outro it seems I watched only 86.54%. Otherwise, this might be a trakt issue though since I think after noticing it I manually set them to watched. Maybe I'm misremebering? After setting it to watched again manually today, it seems to stick, so I don't know what's going on...
edit: at this point I'm pretty sure trakt is having issues: my History AGAIN doesn't include the 2 episodes! Same with S02E03 of Luke Cage
Maybe I closed the episode too early because of the long outro it seems I watched only 86.54%.
Probably not. The default value for getting marked as "complete" is 80%, unless you've changed it in trakt settings.
Looking at the logs, it must be a trakt thing, since we have clearly sent the scrobbles to the server and they've been successful.
I've pushed a commit that makes it a bit more clear what trakt replied about the scrobble (whether it got stopped, or simply "paused"). I've also made some internal changes to the mpv monitor on windows, so it would be helpful if you could make sure there's no bugs introduced:
trakts stop
pipx uninstall
pipx install git+https://github.com/iamkroot/trakt-scrobbler.git
trakts start
Regarding the JSONDecodeError, I think I know why it is happening, but I'll need some more experimentation to verify it. Even so, as I said before, currently, we just drop the connection with mpv when that occurs, and try a fresh one, so having the error shouldn't really impact the scrobbles by much.
It happened again. I am on trakt-scrobbler 1.3.2:
2021-12-10 16:47:28,817 - DEBUG - mpv - monitor - action=scrobble
2021-12-10 16:47:28,818 - DEBUG - mpv - monitor - {'state': 1, 'progress': 56.66, 'media_info': {'type': 'episode', 'title': 'Star Trek The Next Generation', 'season': 2, 'episode': 20}, 'updated_at': 1639151248.8173425}
2021-12-10 16:47:28,818 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 56.66% for Star Trek The Next Generation
2021-12-10 16:47:29,148 - INFO - scrobbler - scrobbler - Scrobble pause successful for Star Trek: The Next Generation S02E20
2021-12-10 17:52:06,644 - DEBUG - mpv - monitor - action=scrobble
2021-12-10 17:52:06,645 - DEBUG - mpv - monitor - {'state': 0, 'progress': 56.66, 'media_info': {'type': 'episode', 'title': 'Star Trek The Next Generation', 'season': 2, 'episode': 20}, 'updated_at': 1639155126.6401112}
2021-12-10 17:52:06,647 - DEBUG - mpv - mpv - Pipe closed.
2021-12-10 17:52:06,647 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 56.66% for Star Trek The Next Generation
2021-12-10 17:52:06,972 - INFO - scrobbler - scrobbler - Scrobble stop successful for Star Trek: The Next Generation S02E20
2021-12-10 17:52:07,648 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-12-11 18:06:42,159 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 2602, 'error': 'property unavailable'}
2021-12-11 18:06:46,044 - DEBUG - mpv - file_info - Raw filepath 'https://user:pass@website.com/dav/_Plex/Movie/Ant-Man.2015.1080p.BluRay.x265-RARBG/Ant-Man.2015.1080p.BluRay.x265-RARBG.mp4'
2021-12-11 18:06:46,047 - DEBUG - mpv - file_info - Converted to url 'https://user:pass@website.com/dav/_Plex/Movie/Ant-Man.2015.1080p.BluRay.x265-RARBG/Ant-Man.2015.1080p.BluRay.x265-RARBG.mp4'
2021-12-11 18:06:46,048 - DEBUG - mpv - file_info - Guessit url '/dav/_Plex/Movie/Ant-Man.2015.1080p.BluRay.x265-RARBG/Ant-Man.2015.1080p.BluRay.x265-RARBG.mp4'
2021-12-11 18:06:46,051 - DEBUG - mpv - file_info - Matched whitelist entry 'https://user:pass@website.com/dav'
2021-12-11 18:06:46,149 - DEBUG - mpv - file_info - Guess: MatchesDict([('title', 'Ant-Man'), ('year', 2015), ('screen_size', '1080p'), ('source', 'Blu-ray'), ('video_codec', 'H.265'), ('release_group', 'RARBG'), ('container', 'mp4'), ('mimetype', 'video/mp4'), ('type', 'movie')])
2021-12-11 18:06:46,150 - DEBUG - mpv - monitor - action=enter_preview
2021-12-11 18:06:46,537 - DEBUG - mpv - monitor - action=pause_preview
2021-12-11 18:07:40,126 - DEBUG - mpv - monitor - action=exit_preview
2021-12-11 18:07:40,130 - DEBUG - mpv - monitor - Exiting preview
2021-12-11 18:07:40,130 - DEBUG - mpv - mpv - Pipe closed.
2021-12-11 18:07:41,131 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-12-11 18:07:51,134 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 2642, 'error': 'property unavailable'}
2021-12-11 18:07:54,917 - DEBUG - mpv - monitor - action=enter_preview
2021-12-11 18:07:56,454 - DEBUG - mpv - monitor - action=exit_preview
2021-12-11 18:07:56,455 - DEBUG - mpv - monitor - Exiting preview
2021-12-11 18:07:56,455 - DEBUG - mpv - mpv - Pipe closed.
2021-12-11 18:07:57,455 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-12-11 18:09:37,463 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 2657, 'error': 'property unavailable'}
2021-12-11 18:11:55,657 - ERROR - mpv - __init__ - Unhandled exception
Traceback (most recent call last):
File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook
run_original(*args2, **kwargs2)
File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 80, in run
self.conn_loop()
File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 334, in conn_loop
self.on_line(line)
File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 176, in on_line
mpv_json = json.loads(line)
File "C:\Users\alima\.pyenv\pyenv-win\versions\3.8.10\Lib\json\__init__.py", line 343, in loads
s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 232: invalid start byte
Quick question, does the file name/path have a €
sign somewhere?
:/@._-
are the only symbols, other that that only letters and numbers
and :
is only at the beginning after https
the link to the file you mean, correct?
Hmm, never mind then. Looks like some weirdness with encodings and I would prefer not to go down that rabbit hole. MPV says that it sends UTF-8, but then also goes on to say that the data may be malformed, so we can't make any assumptions about it. I'm just gonna go ahead and have our app ignore all non-UTF8 chars.
That sounds like a valid solution. I could see how german filenames might become an issue, since Üü, Ää, Öö and ß are not utf-8. But I'm not sure if it is common to use these in filenames of tv-shows or movies. Maybe those symbols could be caught and replaced with Ue, Ae, Oe and ss instead? Those are common replacements and might even still be picked up by trakt. At least the search on the website does allow it! example: Don't judge the movie choice, it was the first thing I could think of with a non utf-8 symbol 😆
Yeah, I'm not even sure how mpv deals with this. They say they want to give utf8 data, and if that were the case, life would be really simple! I'll experiment with some umlauts to see what happens, when I get some time.
Great, Thanks! At least we now know what the issue is. Seems very random when/if this happens. Maybe that would even be an issue to open on mpv-player/mpv? Though since they do state it might be malformed, they might not plan to fix it.
At least on linux, I'm not seeing any problems with umlauts. Looking closer, Ü is a proper unicode char: https://www.compart.com/en/unicode/U+00FC
So the file is getting scrobbled perfectly well. Not sure if it is some Windows-specific bug that you faced earlier.
Closing due to inactivity.
Describe the bug
It worked fine a while ago, but suddenly it didn't scrobble anymore. I am using the mpv-http branch of this repo.
Desktop (please complete the following information):
To Reproduce
Log file
Click to see log contents
``` 2021-06-19 09:17:22,738 - DEBUG - mpv - file_info - Raw filepath 'Z:\files\_Plex\TV\Harley Quinn (2019)\S01\Harley Quinn (2019) S01E09 A Seat at the Table (4Kto1080p DCU Webrip x265 10bit AC3 5.1 - Goki)[TAoE].mkv' 2021-06-19 09:17:22,747 - DEBUG - mpv - file_info - Matched whitelist entry 'Z:\files\_Plex' 2021-06-19 09:17:23,282 - DEBUG - mpv - file_info - Guess: MatchesDict([('title', 'Harley Quinn'), ('year', 2019), ('season', 1), ('episode', 9), ('episode_title', 'A Seat at the Table'), ('streaming_service', 'DC Universe'), ('source', 'Web'), ('other', 'Rip'), ('video_codec', 'H.265'), ('color_depth', '10-bit'), ('audio_codec', 'Dolby Digital'), ('audio_channels', '5.1'), ('release_group', 'Goki)[TAoE]'), ('container', 'mkv'), ('mimetype', 'video/x-matroska'), ('type', 'episode')]) 2021-06-19 09:17:23,283 - DEBUG - mpv - monitor - action=scrobble 2021-06-19 09:17:23,283 - DEBUG - mpv - monitor - {'state': 2, 'progress': 0.22, 'media_info': {'type': 'episode', 'title': 'Harley Quinn', 'season': 1, 'episode': 9, 'year': 2019}, 'updated_at': 1624087043.2836306} 2021-06-19 09:17:23,284 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.22% for Harley Quinn 2021-06-19 09:17:23,292 - DEBUG - scrobbler - trakt_interface - Searching trakt: Title: "Harley Quinn", Year: 2019 2021-06-19 09:17:23,857 - DEBUG - scrobbler - trakt_interface - Trakt ID: 149764 2021-06-19 09:17:24,338 - INFO - scrobbler - scrobbler - Scrobble start successful for Harley Quinn S01E09 2021-06-19 09:17:50,349 - ERROR - mpv - __init__ - Unhandled exception Traceback (most recent call last): File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 171, in on_line mpv_json = json.loads(line) File "c:\program files\python39\lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) File "c:\program files\python39\lib\json\decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook run_original(*args2, **kwargs2) File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 77, in run self.conn_loop() File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 315, in conn_loop self.on_line(line) File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 173, in on_line logger.warning('Invalid JSON received. Skipping. ' + line, exc_info=True) TypeError: can only concatenate str (not "bytes") to str ```
EDIT: After a quick restart (trakts stop; trakts start) it seems to work again? I will do some testing. Not sure what is happening...