misode / upgrader

https://misode.github.io/upgrader/
MIT License
20 stars 2 forks source link

Error: Cannot parse file: Unexpected token in JSON at position 289. #10

Closed brucefroggert2 closed 2 years ago

brucefroggert2 commented 2 years ago

An error occurred while loading a data pack. Data Pack:

Error: Cannot parse file: Unexpected token 
 in JSON at position 289.
    at t (src/Pack.ts:106:9)
    at (https://misode.github.io/upgrader/assets/index.0926d573.js:1:41779) (src/Pack.ts:90:26)
    at async Promise.all (index 755)
    at category (src/Pack.ts:77:13)
    at async Promise.all (index 3)
    at (https://misode.github.io/upgrader/assets/index.0926d573.js:1:41536) (src/Pack.ts:73:32)
    at async Promise.all (index 0)
    at promise (src/App.tsx:69:57)
    at async Promise.all (index 0)
    at newPacks (src/App.tsx:69:9)
misode commented 2 years ago

Could you upload the datapack that you're trying to upgrade?

brucefroggert2 commented 2 years ago

https://www.planetminecraft.com/data-pack/orium-1-0-advanced-resource-processing-and-item-enchanting/

brucefroggert2 commented 2 years ago

Sorry for late reaction I didn't had time to respond

misode commented 2 years ago

The datapack contains invalid JSON in at least data/orium/loot_tables/divine_guidebook.json. More specifically, strings can't span multiple lines.

I'll workaround this by accepting a pack with JSON errors, but ignoring those files and showing a warning.

image

misode commented 2 years ago

You now get a warning, but the rest of the pack gets upgraded. image

brucefroggert2 commented 2 years ago

thnx for the help really fast help