From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW: File is not a resource file. The file is not a valid LabVIEW file

Solved!
Go to solution

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.

0 Kudos
Message 1 of 34
(13,231 Views)

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. Smiley Wink

Message 2 of 34
(13,209 Views)

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

Message 3 of 34
(13,199 Views)
Solution
Accepted by Marcas

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.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 4 of 34
(13,170 Views)
Nice catch, Waldemar!
0 Kudos
Message 5 of 34
(13,166 Views)
wow thx heaps.
0 Kudos
Message 6 of 34
(13,140 Views)

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.

0 Kudos
Message 7 of 34
(13,134 Views)

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,

0 Kudos
Message 8 of 34
(11,087 Views)

Hi Grant_Cargill,

your "vi" is an image.

 

Mike

0 Kudos
Message 9 of 34
(11,083 Views)

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.

0 Kudos
Message 10 of 34
(11,080 Views)