christofmuc / KnobKraft-orm

The KnobKraft Orm - The free modern cross-platform MIDI Sysex Librarian
GNU Affero General Public License v3.0
202 stars 26 forks source link

JSON errors starting up V2.2.3 #337

Open Andy2No opened 3 weeks ago

Andy2No commented 3 weeks ago

I realise V2.2.3 is now out of date, but I was trying to stick with it so I can use my usual PC for this purpose, which has Windows 7.

Today, when I start it up, I just get a stream of JSON errors in the log. Is there a cure for this problem? I can't find any mention of it:

10:13:01: info Launching KnobKraft Orm
10:13:01: Overriding built-in automatic category rules with file C:\Users\andy\AppData\Roaming\KnobKraft\automatic_categories.jsonc
10:13:01: Overriding built-in import category rules with file C:\Users\andy\AppData\Roaming\KnobKraft\mapping_categories.jsonc
10:13:01: warning Overriding built-in adaptation DSI Tetr4 (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:13:01: warning Overriding built-in adaptation Minilogue XD* (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:13:01: warning Overriding built-in adaptation Minilogue XD (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:13:01: warning Overriding built-in adaptation Pro 800 (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:13:01: warning Overriding built-in adaptation Waldorf Pulse 2 (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:13:02: warning Lost communication with DSI Prophet Rev2 on channel 1 of device  - please rerun auto-detect synths!
10:13:02: warning Lost communication with DSI Tetr4 on channel 1 of device  - please rerun auto-detect synths!
10:13:02: warning Lost communication with Waldorf Blofeld on channel 1 of device MIDISPORT 4x4 Out C - please rerun auto-detect synths!
10:13:03: warning Lost communication with ZOOM MS Series on channel 1 of device ZOOM MS Series - please rerun auto-detect synths!
10:13:03: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value - invalid literal; last read: 'n<U+0000>'
10:13:03: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 78: syntax error while parsing value - invalid string: ill-formed UTF-8 byte; last read: '"'
10:13:03: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 78: syntax error while parsing value - invalid string: ill-formed UTF-8 byte; last read: '" '
10:13:03: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 78: syntax error while parsing value - invalid string: ill-formed UTF-8 byte; la

I was trying to make an adaptation for the Reface CS, based on the one for the CP. I've now removed that .py file from the KnobKraft-Adaptations folder though and still get the same stream of error messages, so presumably that's not the cause.

Andy2No commented 3 weeks ago

After removing the two .jsonc files it refers to above, I still get the same or similar errors:

10:25:00: info Launching KnobKraft Orm
10:25:00: warning Overriding built-in adaptation DSI Tetr4 (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:25:00: warning Overriding built-in adaptation Minilogue XD* (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:25:00: warning Overriding built-in adaptation Minilogue XD (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:25:00: warning Overriding built-in adaptation Pro 800 (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:25:00: warning Overriding built-in adaptation Waldorf Pulse 2 (found in user directory C:\Users\andy\KnobKraft-Adaptations)
10:25:00: warning Lost communication with DSI Prophet Rev2 on channel 1 of device  - please rerun auto-detect synths!
10:25:01: warning Lost communication with DSI Tetr4 on channel 1 of device  - please rerun auto-detect synths!
10:25:01: warning Lost communication with Waldorf Blofeld on channel 1 of device MIDISPORT 4x4 Out C - please rerun auto-detect synths!
10:25:01: warning Lost communication with ZOOM MS Series on channel 1 of device ZOOM MS Series - please rerun auto-detect synths!
10:25:01: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value - invalid literal; last read: 'n<U+0000>'
10:25:01: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 78: syntax error while parsing value - invalid string: ill-formed UTF-8 byte; last read: '"'
10:25:01: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 78: syntax error while parsing value - invalid string: ill-formed UTF-8 byte; last read: '" '
10:25:01: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 78: syntax error while parsing value - invalid string: ill-formed UTF-8 byte; last read: '"'
10:25:01: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value - invalid literal; last read: 'n<U+0000>'
10:25:01: error JSON error parsing source information of patch: [json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value - invalid literal; last read: 't<U+0000>'
...
Andy2No commented 3 weeks ago

How can I tell what files it's trying to parse, while producing these json errors? It says, for example, "parse error at line 1, column 2:" but doesn't give any indication of the file that it's line 1 of.

Andy2No commented 3 weeks ago

Solution (hopefully): I've removed mapping_categories.jsonc from the folder where my database gets opened from (within My Documents, not at the default location). It was dated 2022-01-04, but as far as I'm aware, has never caused this problem before.

I'm now back to a normal looking error log, without the mysterious json errors.

Feel free to close this. Maybe it will be useful to someone else, I don't know. Perhaps the problem was very version specific? Or maybe it relates to updating after putting the database in a non-default location, and will affect other people. I hadn't used V2.2.3 much but I expect I would have seen the error if it happened before.

I think it would be a good idea to at least make this error message give a clue what file is involved though.

I'll get back to what I was trying to do when I recover the energy.

christofmuc commented 3 weeks ago

Sorry to hear that made trouble, I agree there needs to be a better error message. That import mapping seems to be a bit of a forgotten feature! I will make sure newer KnobKrafts behave better!

Andy2No commented 3 weeks ago

Thanks.