fromPathweaverJson throws IOException despite the file actually existing in the correct location

I am calling TrajectoryUtil.fromPathweaverJson() with a correct path. I know this is a correct path because I can ssh directly to the files on the rio and see them (I also chmod 777’d them). I also know this is the correct path because the line before TrajectoryUtil.fromPathweaverJson(), file.exists() returns true for the exact path (same Path object). The exact same code works on the simulator too. I know that 2021.3.1 WPILIB had this issue, my question is: is there anything I am missing or why is this not fixed?

What are the details of the exception? The fromPathweaverJson method throws IOException if any exception is thrown reading the file, including parse errors (e.g. it can’t be parsed as JSON, or it doesn’t have the keys it should have).

Path is case sensitive as well so any spaces or case errors in the path name will cause it to not import

Can you link to your code and your path file?

This has 2 paths. I think we are now importing 9 paths. Let me know if this helps or you have questions

I am sorry I should have been more clear. I was asking for OP to post their code / paths. Maybe this will help them though!

What issue specifically are you talking about?

2 Likes

Note this didn’t raise IOException, it actually raised NoClassDefFoundError, but the error referred to IOException.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.