#understanding how to properly make yml files

1 messages ยท Page 1 of 1 (latest)

gusty totem
#

let me show you the issues

lapis domeBOT
#

Please complete #938455615741775902 and someone from the community or one of our <@&938443185347244033> members will respond when they're available.

Including the meta.log from the beginning is a huge help use !logs for more information.

gusty totem
mellow wigeon
#

OK. What's the issue? That YML file will show some red highlighting in VSCode because of the indentation, but it appears that PMM processes it OK.

gusty totem
#

im just trying to understand is it now supposed to have the indentation like that

mellow wigeon
#

Compare this:

templates:
    collection:
    |   sort_title: +09_<<collection_name>>
    |   sync_mode: sync
    |   collection_order: custom
    |   |
----5----0

There's a heading, then the first level is indented by four spaces, then third level again indented by four spaces.

compare to this:

collections:
     Fast and the Furious:
     |  template: {name: collection}
     |  |
----5----0

There's a heading, then the first level is indented by FIVE spaces, then third level indented by THREE spaces.

#

All of those indents should be consistent. Four spaces [or whatever] everywhere.

#

I use two spaces, but the key is that they have to be the same throughout.

gusty totem
mellow wigeon
#

I honestly can't imagine why changing this:

collections:
     Fast and the Furious:
        template: {name: collection}

to this:

collections:
    Fast and the Furious:
        template: {name: collection}

Would cause any errors.

#

I'd have to see a log of that happening.

gusty totem
mellow wigeon
#

Can you provide the edited collections.yml?

gusty totem
#

of course

mellow wigeon
#

Did you perhaps only change the indentation on the first collection?

gusty totem
mellow wigeon
#

The indentation needs to be the same THROUGHOUT.

#

All those collections need to be indented by four instead of five.

#

Not just the first one.

gusty totem
mellow wigeon
#

I don't understand.

#

This is a different error than you were getting before?

mellow wigeon
#

I need to see a log of that correctly indented collections.yml causing a problem.

#

Not some half-edited collections.yml.

gusty totem
#

unless im just dumb or had and extra space somewhere i didnt realize but i just retried this and it built the collections

mellow wigeon
#

Can't offer much without seeing the problem happen. What you've described has never caused any errors that I've seen.

gusty totem
mellow wigeon
#

That log doesn't appear to contain any error related to reading this file.

gusty totem
#

yeah i mustve created my own errors and didnt realize it

mellow wigeon
#

It's got plenty of other errors, but none relating to indentation in collections.yml

gusty totem
#

would this also be the same reason why the playlist gets errors

mellow wigeon
#

You've got the playlist file in the wrong place in the config.

gusty totem
#

like this

mellow wigeon
#

Nope.

#

correct:

libraries:
  Movies:
    metadata_path:
      - pmm: basic
...
  TV Shows:
    metadata_path:
      - pmm: basic
...
  Anime:
    metadata_path:
      - pmm: basic
...
playlist_files:
  - pmm: playlist

not what you have:

libraries:
  Movies:
    metadata_path:
      - pmm: basic
...
  TV Shows:
    metadata_path:
      - pmm: basic
...
  Anime:
    metadata_path:
      - pmm: basic
...
  playlist_files:
      - pmm: playlist

Note the difference in indentation on playlist_files, and, again, the consistency of indentation throughout.

You've got playlist_files indented too far [so it's under libraries instead of at the top level as it should be], and then the two lines under it are indented four spaces instead of the two you're using everywhere else.

gusty totem
#

i love you

#

it worked