wpilibsuite / PathWeaver

Desktop application for generating motion paths
Other
64 stars 68 forks source link

error MalformedJsonException: Invalid escape sequence at line 3 column 24 path $.field-image #262

Closed dorinon closed 2 years ago

dorinon commented 3 years ago

Describe the bug
im trying to add a new map i followed the instructions and when i run pathwaver it gives me this error and those not open

To Reproduce
Steps to reproduce the behavior:

  1. try to add a map
  2. run the program

Expected behavior
opening pathwaver with the addition of the map

Screenshots
my json file: { "game": "testMap", "field-image": "C:\Users\User\PathWeaver\Games\customeGame\field-image.png", "top-left": [0, 114.3], "bottom-right": [236.2, 0] }, "field-size": [236.2, 114.3], "field-unit": "cm" }

Desktop (please complete the following information):

Additional context

its my first time using pathwaver. the image and the json file are in the same subdirectory

PeterJohnson commented 3 years ago

You need to put two slashes \\ in place of each \ in the path, since \ is an escape character.

jasondaming commented 3 years ago

I assume you were following these instructions?

As you can see there the line "field-corners": { is needed before top-left. The json you posted above is not valid, you can tell by the unmatching brackets.

jasondaming commented 3 years ago

To @PeterJohnson point I would recommend not including the path and instead just using the filename and placing the file in the game directory

jasondaming commented 2 years ago

Do you have any additional questions about this? If not I will close this issue soon.