xBridge2.wxl invalid data in file error No.2
Closed this issue · 14 comments
Hi! First, Jstevensog thank you on your great work!
I have the same issue today with latest 2.47e trying to write it to wixel.
When I try to open the .wxl app the Pololu Wixel Config Utility says exactly the same:
Invalid data in file.
App File could not be opened: xBridge2.wxl
I am using RPi - Raspbian (all latest updates) to do that. As a note: other .wxl files (for example jamorhams wixel-xDrip..) are opening without a problem.
I tried to download through cli using git , tried to download as zip file and than extract it on RPi, tried to do the same on Win and then transfer the file to RPi using Samba etc... Always the same error when I try to open wxl in the Wixel Utility.
Is there any solution for this?
I saw the closed issue #16 but can not reopen it so I am opening this as a new issue No.2. Apologies if this is not appropriate, please correct me if I am wrong.
EDIT1: Using Notepad++ I changed newline (line ending) from CR+LF combination in the .wxl file to pure LF and now reading the app works just fine also on RPi.
After deeper analyzing the issue I have found that the problem is line endings of the .wxl file that are CR+CR+LF .
As such, the file can be opened without problem using Pololu Wixel Config Utility on Windows while those line endings are not acceptable by the same app Pololu Wixel Config Utility on RaspberryPi. The issue can be resolved (using for example Notepad++) through changing those CR+CR+LF line endings with regular CR+LF or just LF line endings - both those line endings fully works on both Windows as well as Linux (RPi) so my recomendfation would be to just use CR+LF or LF instead of CR+CR+LF if it is possible.
Hi @jstevensog and thank you very much for joining in even after I closed the issue. Appreciate this very very much! The issue is that in the latest version of the wxl file there seems to be CR+CR+LF line endings instead of regular CR+LF so that extra CR is producing the error on RPi while working on Win in the same time. I have easily fixed this with Notepad++ after figuring out what is the issue.. Maybe this extra unneeded CR can be removed somehow in the future builds what will consequently remove this issue on RPi.
Just adding that I have this issue on the mac. I have to download the whole repo. Simply downloading the .wxl results in a flash fail. I'm guessing for the reasons described above.
Thanks man! Just a small hint, if you maybe find it useful: From what I can see, the present situation has one extra "unneeded" CR added before regular CR+LF ending. I think that one option is just to remove that first CR and leave CR+LF endings, or second option could be to remove both CRs in a row and just leave the LF endings. I think both options would produce good results, so it is a mater of choice which one is easier for the developer. Thanks once again for the great app!!
Great thanks John. Have been on the lookout for a new firmware. Will try f now. Although I'm on a PC so can't verify the corruption fix for a bit.
Edit: From https://github.com/jstevensog/wixel-sdk/tree/v2.47f/apps/xBridge2 I get Invalid data in file. App File could not be opened: xBridge2.wxl
from the config utility on PC.
I right clicked the file and selected Save as
... is that what I was supposed to do? Downloading the SDK .zip works.
FYI I get two readings and it seems to go to sleep and never recover. I'll log a separate issue when I get the chance.
Tnx @jstevensog everything fixed! Now is just a LF line ending which is great. I can confirm the fix is successful.
Also, thank you on provideing the f update. looking forward to test this.
Just confirming. Right click and save as (windows 7) results in a corrupt file for me still. "Invalid data in file.
App File could not be opened: xBridge2.wxl"
Thanks for following up John :) - It's not a major hindrance at all. It must be a Github thing. Weird though. You'd think you should be able to download a file untouched this way.