08-11-2009 06:20 PM
I have a very simple .vi wired up to unzip a file but I continue to receive this message:
>>>>
Error 42 occurred at NI_Unzip.lvlib: Open unZip File.vi
Possible reason(s):
Error opening the zip file.
Complete call chain:
NI_Unzip.lvlib:Open unZip File.vi
NI_Unzip.lvlib:Unzip.vi
simple zip test.vi
<<<<
A previous poster saw this message with files of a different format, but I know mine should work since I zipped the file in LabView with its ZIP .vi's.
I also get curiously different messages depending on whether I have a leading colon in my path (I'm on LabView 8.5.1 on the MacOS). The message above is generated when I have a leading colon. When I don't have a leading colon, I get the message:
>>>>
Error 1430 occurred at Open/Create/Replace File in NI_Unzip.lvlib:Unzip.vi->simple zip test.vi
Possible reason(s):
LabVIEW: The path is empty or relative. You must use an absolute path.
<Not A Path>
<<<<
I find this surprising since the .vi I have attached is clearly not a relative path but an absolute path back to my hard drive. Would anyone have any suggestions?
Thanks!
08-11-2009 10:04 PM
jlbibc wrote:I have a very simple .vi wired up to unzip a file but I continue to receive this message:
>>>>
Error 42 occurred at NI_Unzip.lvlib: Open unZip File.vi
Possible reason(s):
Error opening the zip file.
Complete call chain:
NI_Unzip.lvlib:Open unZip File.vi
NI_Unzip.lvlib:Unzip.vi
simple zip test.vi
<<<<
A previous poster saw this message with files of a different format, but I know mine should work since I zipped the file in LabView with its ZIP .vi's.
I tried your VI and zip file and they worked fine for me.
I also get curiously different messages depending on whether I have a leading colon in my path (I'm on LabView 8.5.1 on the MacOS). The message above is generated when I have a leading colon. When I don't have a leading colon, I get the message:
Why would you have a leading colon? That isn't a valid character in a filename.
>>>>
Error 1430 occurred at Open/Create/Replace File in NI_Unzip.lvlib:Unzip.vi->simple zip test.vi
Possible reason(s):
LabVIEW: The path is empty or relative. You must use an absolute path.
<Not A Path>
<<<<
I find this surprising since the .vi I have attached is clearly not a relative path but an absolute path back to my hard drive. Would anyone have any suggestions?
The VI you attached doesn't have any paths in it. Both path controls are empty by default.
Thanks!
08-12-2009 11:39 AM
Fair enough, but I still can not get this to work on my computer (LabView 8.5.1 for PowerPC, Mac OS 10.5.8). The leading colon was an attempt to actually put in a relative path.
Last night I ran a mass compile which I have been putting off since I upgraded from 8.2 to 8.5.1 as I thought there might be some uncompiled sub VI hidden in there somwhere, but no luck. This morning in trying to unzip a file made with the zip functions in LabView I still get the message:
Error 1430 occurred at Open/Create/Replace File in NI_Unzip.lvlib:Unzip.vi->simple zip test 2.vi
Possible reason(s):
LabVIEW: The path is empty or relative. You must use an absolute path.
<Not A Path>
This time around I wired path indicators to prove to myself that I was dealing with absolute paths and not relative paths. The error message says the path is <Not A Path> but the path type functions clearly indicate that the paths are absolute paths and the "Check if File or Folder Exists" VI clearly shows that the file and folders exist.
I am at a complete loss and I really feel like this is a bug in the program. Is this potentially a PowerPC problem or a Mac-only issue? I don't have a copy on an Intel Mac to try out...
08-12-2009 12:29 PM - edited 08-12-2009 12:32 PM
Can you post an example of a .zip file where you have leading colons? The one you attached does not. As I said, colons are not a valid character in a filename. Unless for some reason Apple allows it, in which case it probably shouldn't.
Or are you talking about "..\myname.txt" when you are talking about "leading colons". That is the only thing that might make sense to me when you are talking about relative paths.
EDIT: I now see in your .vi you have a path such as "MacintoshHD:\Users\grimm\Desktop". That doesn't look right at all. Normal notation if you are not using drive letters would be "\\MacintoshHD\Users\grim\Desktop" to refer to a drive by name.
08-12-2009 12:37 PM
08-12-2009 03:28 PM - edited 08-12-2009 03:30 PM
Ravens Fan and Matthew Kelton - These are not productive comments, and they reflect a misunderstanding of how paths are represented on the Mac. Despite adopting a *NIX style directory structure in Mac OS X, LabVIEW continues to see files and folders with the classic MacOS structure. For instance, this could be a valid path:
hard drive : path : to : file.txt
There are of course no spaces, but I don't want my colon-p's turning into smiley faces.
In this notation colons -- not slashes -- separate folders, and the root is always the name of the drive. Thus paths starting with the hard drive are absolute, and paths starting with colons are relative to the present working directory.
In my example I added "Path Type" and "Check if File or Folder Exists" functions to verify that things exist and the paths are absolute. This is in fact redundant since I provided the paths in the path select dialog box before the program ran.
It is completely possible that there is some little subVI within the unzip.vi that is expecting a DOS/Windows-style directory structure, but this is not the fault of my code, but rather represents a bug in LabVIEW. I have additionally tested this on a copy of LabVIEW 8.5.1 on an Intel Mac and I get the same response. I appreciate the testing on Windows that the other posters have performed, and I feel that this is another indication that there is a bug in the unzip.vi code.
As a matter of fact, I'm sure of it. When I change the path to "C:\Users\grimm\Desktop\meh.zip" I get a different error message than the <Not A Path> error. In this case I get:
Error 42 occurred at NI_Unzip.lvlib:Open unZip File.vi
Possible reason(s):
Error opening the zip file.
Complete call chain:
NI_Unzip.lvlib:Open unZip File.vi
NI_Unzip.lvlib:Unzip.vi
simple zip test 2.vi
Is there a Mac user out there that could test this? Otherwise, how do I go about reporting a potential bug?
08-12-2009 03:44 PM
When I run your VI on an Intel Mac with LV 2009, it does not generate an error. It lists and unzips the five files which I find when I unzip the test file. I am not an XML expert but the files look like they came through OK.
File path which works fine = Macintosh HD:Users:johnsold:Documents:Downloads:meh.zip
Lynn
08-14-2009 09:44 AM
08-14-2009 09:55 AM