ChordPro / chordpro

Reference implementation of the ChordPro standard for musical lead sheets.
Other
310 stars 51 forks source link

Warning on PDF export #257

Closed Loco1911 closed 1 year ago

Loco1911 commented 1 year ago

Since the last update I am receiving the following warnings:

: C:\Users\exequ\OneDrive\ChordPro\myconfig.json: Undefined config "pdf.formats.default.subtitle" (using 'false')

: C:\Users\exequ\OneDrive\ChordPro\myconfig.json: Undefined config "pdf.formats.default.title" (using 'false')

: C:\Users\exequ\OneDrive\ChordPro\myconfig.json: Undefined config "pdf.formats.first.footer" (using 'false')

: Problems found!

Steps to reproduce the behavior:

  1. Go to 'File'
  2. Click on 'Preview'

System information:

My config file: myconfig.zip

ChordPro commented 1 year ago

Apparently you are using null values for some of the formats.

   "pdf":
       "formats" : {
      "default" : {
          "title"     : null,                <==
          "subtitle"  : null,                <==

The value null is no longer valid. Please use [] instead. Apologies for the inconvenience.

Loco1911 commented 1 year ago

After changing those values I am receiving the following error:

: , or } expected while parsing object/hash, at character offset 4976 (before "] },\r\n { "n...") at C:/Program Files (x86)/ChordPro.ORG/ChordPro/script/../lib/App/Music/ChordPro/Config.pm line 286.

: Fatal problems found!

sciurius commented 1 year ago

Probably a typo. Please include the full config.

Loco1911 commented 1 year ago

Sorry, I forgotten upload the config file. myconfig.zip

sciurius commented 1 year ago

If you visit your config file in a decent editor and you skip forward from the beginning to character 4976, you can see that the definition of the D/F# chord has an extraneous closing bracket ]. Removing this gets rid of the error. BTW, I didn't see any differences in the pdf.formats - did you fix the title, subtitle and footer entries?

Loco1911 commented 1 year ago

Thanks for the help! I already corrected the chord D/F# and I changed all the Null values for [] and I no longer have errors. Thank you very much!