wrap.loadPoints cannot load points that are saved using wrap.savePoints

Hi,

I am having trouble with the txt file that’s generated using wrap.savePoints.
I was able to use wrap.savePoints to save a few points (barycentric) to a txt file. However, when I was trying to load these points back to WrapX, it gave me the following error:


Traceback (most recent call last):
File “<wrap_console>”, line 1, in
File “C:\Program Files\R3DS\WrapX1.3\python2.7\lib\python2.7/json/init.py”, line 290, in load
**kw)
File “C:\Program Files\R3DS\WrapX1.3\python2.7\lib\python2.7/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “C:\Program Files\R3DS\WrapX1.3\python2.7\lib\python2.7/json/decoder.py”, line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “C:\Program Files\R3DS\WrapX1.3\python2.7\lib\python2.7/json/decoder.py”, line 383, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded

It sounds like the format of the txt file generated by wrap.savePoints cannot be recognized by wrap.loadPoints. I cannot load this txt file into Wrap3 either. Does anyone have this problem? Thanks for your help!

Hello,

Could you please show the content of the txt file generated by wrap.savePoints command?

Hi Andrew,

Thanks for taking a look at this! Please see attached.

Thanks,
Yubin

Hi Andrew,

A little bit more on what I have attempted.
I have also run the exported data through an online JSON validator (http://jsonlint.com) and it came out to be valid.
I noticed the slight difference between txt file exported by Wrap3 (used as gold standard here) and the file exported using savePoints in WrapX (spaces in between values, etc.). I have tried to manually clean them up to match the txt file exported using savePoints with the ‘gold standard’ but the program still threw me the same error.
Thanks again for looking into this! It is an awesome program!

Best,
Yubin

Hello,

I tried to load your file with WrapX and Wrap3 and both are loading it without any issue. WrapX and Wrap3 have totally different JSON parser implementations and I claim that file is perfectly OK. I understand that this may sound quite naive after all that you wrote but can you please double check that you are trying load the same file? By the way which type of error you are getting while trying to load it in Wrap3? Is it like this - “An error occured during reading Json file: illegal value”?

Ivan