dmunozv04 / iSponsorBlockTV

SponsorBlock client for all YouTube TV clients.
GNU General Public License v3.0
2.47k stars 103 forks source link

"Could not load config file" #199

Open Maverynthia opened 2 weeks ago

Maverynthia commented 2 weeks ago

Before opening an issue make sure that there are no duplicates and that you are on the latest version. Describe the bug Used main_tui to get a config file, config file isn't loaded when then using main Also says it created a config file and it doesn't (running main --setup does not run setup)

To Reproduce Steps to reproduce the behavior:

  1. use main_tui.py get config file
  2. run main.py
  3. get error

Expected behavior That it finds the config file and works.

Screenshots image image image image

You can see I'm running it from the source src directory. TUI puts the config file in that directory src\data\config.json\config.json. TUI can also open and read the file it creates. C:\Python\iSponsorBlockTV-main\src

iSponsorBlockTV server (please complete the following information): Windows 10 64 Python 3.11

Apple TV (please complete the following information): Samsung Series 7

Other Info Windows binaries need a .exe extension. The windows binary did the same thing.

Soheab commented 2 weeks ago

Does the config have a device?

dmunozv04 commented 2 weeks ago

It sounds like another instance of this: https://github.com/dmunozv04/iSponsorBlockTV/issues/192#issuecomment-2358185433 TL;DR: Use main.py --config instead of main_tui.py since it was just made for ease in development. I should probably just remove it

dmunozv04 commented 2 weeks ago

Interesting that main --setup doesn't run setup, that must be a bug. Try with main setup

Maverynthia commented 1 week ago

Please post your config (making sure to redact sensitive info). Also, calling main_tui.py sets the data_dir to a different place that what the regular program does; try opening the configurator by using main.py --setup

image

Doesn't look like --config is working either. Where is the config.json supposed to go in relation to /src/

image

{
    "devices": [
        {
            "screen_id": "<randomNumbersAndLetters>",
            "name": "Snamsoong s743",
            "offset": 0
        }
    ],
    "apikey": "",
    "skip_categories": [
        "sponsor",
        "selfpromo",
        "interaction",
        "exclusive_access"
    ],
    "channel_whitelist": [],
    "skip_count_tracking": true,
    "mute_ads": false,
    "skip_ads": true,
    "auto_play": false
}

Mightbe helpful for it to say: Black config file created at /[dir]/[moredir]/config.json

Soheab commented 1 week ago

The config is supposed to be at /data/config.json/config.json With the last one being the actual file.

data/
  config.json/
    config.json
src/
    iSponsorBlockTv/
        ...
...