10-03-2008 01:07 AM
hi.
I used labview to do a university assignment. As part of the assignment im supposed to send the .vi file to my lecturer but all the .vi files sent using the email system are corrupted. When i try to open mine it gives this error
LabVIEW: File is not a resource file. The file is not a valid LabVIEW file
Alas i also lost my backup as well as i was working on a lab computer and i didnt upload my files to the storage server.
So i was wondering if anyone can help me out. thank you so much.
Solved! Go to Solution.
10-03-2008 09:48 AM
Your VI does appear to be corrupted. NI may be able to recover it so you can try to contact tech support. You can try to check to see if there's an auto-saved version of your VI in the LabVIEW Data folder. Normally this resides in (assuming Windows) "My Documents\LabVIEW Data\LVAutoSave". Of course, this assumes that you have auto-save turned on.
Apparently your mail server is garbling .vi files. You should try to enclose the VIs in a zip file. Also, always make sure you have a backup. Hard lesson to learn, I know.
10-03-2008 11:59 AM
I had the same thing happen to me about 1 year ago 😞
Unfortunately it was unrecoverable.. The worst part was that it happened the morning of a code review with the client.. 😮
I do backups every evening of active code. An easy method is to simply zip the folder containing code that you are working on.
Fortunately, I did have a backup that was 2 days old. But it still took a day to get caught up again.
Backup & backup often... It's worth it.. 🙂
R
10-05-2008 11:17 AM
The problem is that the email system treated the file as textfile. All <CR><LF> sequences have been replaced as <LF>. You can see this opening the VI in an hexeditor. Each VI starts with "RSRC<CR><LF>". Your VI starts with "RSRC<LF>".
I replaced the two occurences of "RSRC<LF>" with "RSRC<CR><LF>" and it opened in LV 8.6. It is just missing some controls and subVIs.
I have done this all on Windows.
10-05-2008 11:22 AM
10-06-2008 01:13 AM
10-06-2008 01:31 AM
excellent!
So who will write a quick analyzer in LabVIEW that identifies this kind of problem, edits the VI file automatically, and opens it. 🙂
I would even suggest that LabVIEW itself should be smart enough to automatically work around this kind of "corruption" and open it anyway. 🙂
Of course there could be irreparable damage elsewhere in the file due to delimiter editing by mail or ftp programs, so I am not sure if this will always work.
02-09-2011 05:33 AM
Hi Waldemar, i am getting the same message with my .vi and wondering if you could see if there was a similar problem with the <CR><LF> sequences.
Best Regards,
02-09-2011 05:36 AM
Hi Grant_Cargill,
your "vi" is an image.
Mike
02-09-2011 05:42 AM
Hi Mike, i noticed that too when i tried to open it from within this forum. It does not open as a .jpg when trying to open from hard drive location. The vi is creating a report that appends .jpg to a word document. I wonder if this has something to do with why it is corrupt?
I will attach again juct to check.