[BUG] Issue when starting trakts
Opened this issue · 5 comments
flameshikari commented
System Info
- OS and Version: Windows 11 Pro 23H2
- Python Version: 3.12.1
- Player and Version: MPC-BE x64 1.6.11
Description
To Reproduce
Steps to reproduce the behavior:
- Install
pipx install --force git+https://github.com/iamkroot/trakt-scrobbler.git@master
- Execute
trakts run
Log file
Click to see log contents
2023-12-30 21:51:56,175 - DEBUG - MainThread - notifier - Notifications enabled for categories: exception, misc, scrobble.pause, scrobble.resume, scrobble.start, scrobble.stop, trakt
2023-12-30 21:51:56,176 - INFO - notify_loop - notifier - Starting notif loop
2023-12-30 21:51:56,176 - DEBUG - MainThread - notifier - Notif actions enabled for categories: exception, misc, scrobble.pause, scrobble.resume, scrobble.start, scrobble.stop, trakt
2023-12-30 21:51:56,333 - INFO - MainThread - scrobbler - Started scrobbler thread.
2023-12-30 21:51:56,341 - ERROR - MainThread - monitor - Config value autoload failed for mpc-be.
Traceback (most recent call last):
File "C:\Users\flameshikari\AppData\Local\pipx\pipx\venvs\trakt-scrobbler\Lib\site-packages\trakt_scrobbler\player_monitors\monitor.py", line 82, in __new__
cls.config = cls.autoload_cfg()
^^^^^^^^^^^^^^^^^^
File "C:\Users\flameshikari\AppData\Local\pipx\pipx\venvs\trakt-scrobbler\Lib\site-packages\trakt_scrobbler\player_monitors\monitor.py", line 112, in autoload_cfg
loaders = getattr(cls, "read_player_cfg")(auto_keys)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\flameshikari\AppData\Local\pipx\pipx\venvs\trakt-scrobbler\Lib\site-packages\trakt_scrobbler\player_monitors\mpc.py", line 84, in read_player_cfg
return cls._read_registry_cfg((path1, key1), (path2, key2))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\flameshikari\AppData\Local\pipx\pipx\venvs\trakt-scrobbler\Lib\site-packages\trakt_scrobbler\player_monitors\mpc.py", line 40, in _read_registry_cfg
error.filename = ",".join(paths)
^^^^^^^^^^^^^^^
TypeError: sequence item 0: expected str instance, tuple found
2023-12-30 21:51:56,347 - WARNING - MainThread - main - Could not start monitor for mpc-be
2023-12-30 21:51:56,348 - CRITICAL - MainThread - main - Exiting scrobbler - no more monitors
iamkroot commented
Have you enabled the web interface from the mpcbe Options?
flameshikari commented
iamkroot commented
Then the next step would be checking the Registry to figure out where the setting is being stored-
- Open the Registry Editor from start (or
regedit
exec) - Navigate to
HKEY_CURRENT_USER\Software\MPC-BE
from the tree-view panel on the left - Try to find a
WebServerPort
key somewhere in there.
flameshikari commented
iamkroot commented
Interesting, this seems to be a recent addition to MPC-BE. From what I recall, MPC (and MPCHC) only use the registry.
Rather than changing the mode to registry, you could also use trakts config set players.mpc-be.port 13579
to manually specify the port number.
On our end, we should support auto-detecting the values from any of these. Will leave this as a TODO.