euzu/m3u-filter

M3uFilter error: cant read config file: mapping values are not allowed in this context

morpheus302 opened this issue · 9 comments

Capture d'écran 2024-09-13 094135
Running M3u-filter in docker in Unraid environment
Here is my config
api: {host: 0.0.0.0, port: 8901, web_root: ./web} working_dir: ./data backup_dir: ./backup web_ui_enabled: true web_auth: enabled: false secret: my.really.secret.secret issuer: m3u_filter userfile: user.txt

The container won't start and here is my log 👍 [2024-09-13T08:22:41Z INFO m3u_filter] Log Level INFO [2024-09-13T08:22:41Z ERROR m3u_filter] M3uFilter error: cant read config file: mapping values are not allowed in this context at line 9 column 28

euzu commented

@morpheus302 your config seems to be wrong. The config files should be valid yaml files and the structure has to match the m3u-filter definitions.

Did you mount the config directory into the docker container ? Did you mount data and backup directories ?

Capture d'écran 2024-09-13 110256

Here is my docker container mappings. thnaks for your help
My config.yml is this:

api:
  host: 0.0.0.0
  port: 8901
  web_root: /web
working_dir: /data
backup_dir: /backup
web_ui_enabled: true
web_auth:
  enabled: false
  secret: my.really.secret.secret
  issuer: m3u_filter
  userfile: user.txt
euzu commented

@morpheus302 the mappings are ok, but in your config you should use this paths
You used relative paths with dot in front (current directory).

working_dir: /data
backup_dir: /backup

But i think the problem is that your config is malformed, you should check the config files.

Here is my config. with ./data or /data it throw the same error. i checked the syntax and it shows no errors

api:
  host: 0.0.0.0
  port: 8901
  web_root: /web
working_dir: /data
backup_dir: /backup
web_ui_enabled: true
web_auth:
  enabled: false
  secret: my.really.secret.secret
  issuer: m3u_filter
  userfile: user.txt

Ok after removing " userfile: user.txt" line the container started.
But i see a blank page when trying to open the web ui.
Capture d'écran 2024-09-13 112612

euzu commented

do you have all config files ?

/opt/m3u-filter/config$ ls
api-proxy.yml  config.yml  mapping.yml  source.yml  user.txt

You dont need user.txt because you dont use web auth.

i have only sources and config i thought that these are the only mandatory files
source.yml

sources:
  - inputs:
    - enabled: true
      type: m3u
      url: redacted
    targets:
      - name: Test1
        output:
         - type: m3u
           filename: Test
        filter: '!ALL_CHAN!'
        options: { ignore_logo: false }

and now im getting this error
[2024-09-13T11:03:26Z ERROR m3u_filter] M3uFilter error: --> 1:1 | 1 | !ALL_CHAN! | ^--- | = expected expr

Sorry i really want to use the webui interface as it will be easier for me

euzu commented

without api-proxy.yml you cant use the web ui or the api to access the content.
Without api-proxy.yml you can only use m3u-playlist output manually and you dont nood to run it as service then.

The Web-UI does not support config editing.
It is only used for visualization of configured sources, or adding/editing user .

The initial configuration creation has to be done manually.

--> 1:1 | 1 | !ALL_CHAN! | ^--- | = expected expr means your filter expression is wrong.

m3u-filter is not user friendly in terms of configuration, this could be done in future when all the important features are implemented.

Thnak you very much for your time and help. I'll mark the issue as closed