Skip to content
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

[BUG] Issue when starting trakts #269

Open
flameshikari opened this issue Dec 30, 2023 · 5 comments
Open

[BUG] Issue when starting trakts #269

flameshikari opened this issue Dec 30, 2023 · 5 comments
Labels
bug Something isn't working monitor Concerning a player monitor

Comments

@flameshikari
Copy link

System Info

  • OS and Version: Windows 11 Pro 23H2
  • Python Version: 3.12.1
  • Player and Version: MPC-BE x64 1.6.11

Description

2023-12-30_21-58-44_650

2023-12-30_21-59-00_651

To Reproduce

Steps to reproduce the behavior:

  1. Install pipx install --force git+https://github.com/iamkroot/trakt-scrobbler.git@master
  2. 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 iamkroot added the bug Something isn't working label Dec 31, 2023
@iamkroot
Copy link
Owner

iamkroot commented Dec 31, 2023

Have you enabled the web interface from the mpcbe Options?

@flameshikari
Copy link
Author

Yes.

image

@iamkroot
Copy link
Owner

iamkroot commented Jan 1, 2024

Then the next step would be checking the Registry to figure out where the setting is being stored-

  1. Open the Registry Editor from start (or regedit exec)
  2. Navigate to HKEY_CURRENT_USER\Software\MPC-BE from the tree-view panel on the left
  3. Try to find a WebServerPort key somewhere in there.

@flameshikari
Copy link
Author

I found the issue. I installed MPC-BE via scoop, it stores settings in Player folder instead of Registry by default. Changing settings location to Registry fixes the issue. Is it worth mentioning this in the installation guide?

2024-01-02_14-07-09_657

@iamkroot
Copy link
Owner

iamkroot commented Jan 4, 2024

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.

@iamkroot iamkroot added the monitor Concerning a player monitor label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working monitor Concerning a player monitor
Projects
None yet
Development

No branches or pull requests

2 participants