iSponsorBlockTV icon indicating copy to clipboard operation
iSponsorBlockTV copied to clipboard

"Could not load config file"

Open Maverynthia opened this issue 1 year ago • 5 comments

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.

Maverynthia avatar Oct 22 '24 05:10 Maverynthia

Does the config have a device?

Soheab avatar Oct 22 '24 16:10 Soheab

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 avatar Oct 22 '24 16:10 dmunozv04

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

dmunozv04 avatar Oct 22 '24 16:10 dmunozv04

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

Maverynthia avatar Oct 27 '24 10:10 Maverynthia

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/
        ...
...

Soheab avatar Oct 28 '24 09:10 Soheab