From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Property Node (Arg :1). Invalid property: Property is not valid for this class.

Solved!
Go to solution

I developed an application to read data from a Microsoft SQL server local database, to then upload it to a Google Sheets document Stored in Google Drive.

 

The code works just fine if executed directly from LabVIEW, but when I put the code in an executable (.exe) and run it, everything seems to work just fine with the exception of the uploadfile.vi from the Gdrive Addon in the code, so the data never gets uploaded to Google Sheets.

 

When debugging the executable an error can be found in the uploadfile.vi that says:

"Property Node (Arg :1)

in Gdrive.lvlib:

uploadfile.vi -> New DCT Program.vi"

 

Furthermore, if you probe the wires at the outputs of the uploadfile.vi from Gdrive, it says ERR(4) and if you click for more info a window pops up specifying an error value stating: {status => False, code => 0, source => ""}

 

Has anybody experienced something like this? It seems that the Gdrive Addon doesn't work properly when put into an executable (.exe) app.

 

I'm using LabVIEW 2017, the Database Connectivity toolkit and the GDrive for LabView Addon on a windows 7 PC.

 

Thanks in advance;

 

René

Download All
0 Kudos
Message 1 of 15
(3,696 Views)

I'm a little confused.  I don't know where you have your Probe (can you put a Probe into an Executable?  If so, I've never done it, and didn't realize it was possible), but the Probe is returning "No Error" (Error Status = False, Error Code = 0, No Error).  One of the pictures showing Error 4 has the Error wire going into what looks like Clear Error.  Are you hoping to "allow Errors under certain conditions, but ignore them", and the "ignore them" isn't working?

 

There are some settings in LabVIEW that, I confess, I don't fully understand, and usually leave alone.  They are in the Error Handling options for the Block Diagram settings, one of which is "Enable automatic Error Handling Dialogs" -- is this popping up when it shouldn't?

 

Then, again, what is Error 4?  "End of File encountered".  I'm not completely sure what the function(s) are that you are calling, but is it possible that you are giving it "bad data" and it finding an empty file or the wrong file?

 

The fact that it works in Development mode and fails in Execution mode may suggest that you have a subtle problem with File Location.  Take a look at your code and see how you build the file paths.  I don't recall all the details, but certain (relative, I think) paths have what appears to be an additional folder when called from an Executable (I may have this backwards -- I tend to use absolute paths for this reason ...).

 

Bob Schor

0 Kudos
Message 2 of 15
(3,663 Views)

Thanks for your reply Bob:

 

When you create an executable, in the advanced settings you can check a mark that enables debugging for the executable; doing this, you can pop out the block diagram from the executable, and you can do that either remotely, or in the target computer where the executable is running.

To access this debugger you first need to run the executable, then open the project from which you created it, then select the Operate tab, and then select Debug Application or Shared Library... You then will be able to access the block diagram and see how your executable is running in debugging mode.

 

Going deeper into the matter of my problem, I'm attaching a picture of my main code, which displays ERR4 in the uploadfile from the Gdrive addon. Then I attach another picture going into that uploadfile.vi and we can further see all the places where errors occur, which are ERR7 and ERR4 again.

 

Again, the code does two simple things:

 

Part 1: read data using the Data connectivity toolkit and write it into a local excel file

 

Part 2: Uplad the data contained in the local excel file to a google sheets document using the Gdrive Addon

 

The error clearle occurs in the uploadfile.vi from the addon.

 

I've been reading about how paths can be a problem, but I'm using paths in the DTC toolkit as well and i dont have any problem there. Anyway, what do you mean with absolute paths?

 

Thanks;

 

René

Download All
0 Kudos
Message 3 of 15
(3,659 Views)

Thanks Bob,

 

Complementing my past response, now I attach the full project.

 

 

Thanks,

 

René

0 Kudos
Message 4 of 15
(3,657 Views)

Are you adding the vi.lib to your .EXE and another question are you running the exe on the same computer?

0 Kudos
Message 5 of 15
(3,627 Views)

Hello and thanks for your reply.

 

1 -.I've tried to run the executable in the same computer where I developed it and also on the target computer where the executable is going to belong and I have the same problem in both cases.

 

2-. The vi.lib appears under Dependencies on the Project; nevertheless, when creating the EXE on the source files section I just include the only VI the project has, because that's the only option I have.

 

On the Source File setting I see Dependencies show up below the main and only VI but I didn't modify any settings there.

 

I will attach pictures for reference.

 

Thank you.

0 Kudos
Message 6 of 15
(3,625 Views)

When I open the Project and look at New DCT Program, it is missing two sub-VIs, Initialize and uploadfile.  These need to be in the Project.

 

You mention Error 7 -- that's File Not Found.  I see you are using "Absolute paths", which are paths that start from a Drive (or Share) location and then specify each and every sub-folder on the way to the final filename.  The two file paths I see, one to a .json and one to a .xlsx, are files to data, so as long as the data are present (hint -- test to see if the data are present before you try to open it, and take appropriate actions if it is (good for reading) or isn't (good for writing).

 

Bob Schor

0 Kudos
Message 7 of 15
(3,617 Views)

Thanks Bob,

 

"Initalize" and "uploadfile" are note really sub-VIs, those are part of the Gdrive addon that I used to develop the program. The reason why you see them as missing is because you don't have the Gdrive addons installed in your computer.

 

When I create the executable, I don't have the option to include them in the executable as sub-VIs, my guess is because they act as any other function included in LabVIEW.

 

I'm attaching a picture for reference.

 

Thanks;

 

René Martínez

0 Kudos
Message 8 of 15
(3,611 Views)

OK, you installed GDrive from the LabVIEW Tools Network.  I'm not sure where it put this, maybe User.lib, but as I don't have it installed, the sub-VIs in that Library (and they are, indeed, sub-VIs) show as "missing".  But never mind.  Somewhere you are getting an error that is being given the error code 7, which NI uses for "File Not Found".  There was also, as I recall, Error 4, which seems to me "less specific".  

 

Well, I just installed GDrive on my machine.  The sub-VIs, in particular UploadFile, can be opened and "watched" (or Probed).  Since there seems to be an issue with File Names, I recommend putting a Probe on the FilePath wire going to Open Config Data (it's the function right after the Build Path that has "typetomime.txt" as an input).  Also check out the file path carried in the String wire going from the "To String" coming from the Local Path input.  I'll wager (a dime, not very adventurous) one of those will be "bad" ...

 

Bob Schor

0 Kudos
Message 9 of 15
(3,600 Views)

Thanks Bob,

 

So far I think I've made a little improvement. When I made the post, I was getting two types of errors inside the uploadfile.vi, one of them was ERR7 and the other one was ERR4.

 

What I did is that at the beginning of the code, I replaced a node called "Current VI path" with a node called "application directory", and that actually cleared the ERR7 I was getting, now I'm just getting the ERR4. (This fix is indeed related to how LabVIEW and executable access paths).

 

Another thing I noticed when debugging my executable, is that the various Property Nodes where de ERR4 shows up, if you place the mouse on top of them with the Help window active, it will say the following: "The property is not valid for this class".

 

Let's remember this problem is not present when running the code from the LabVIEW environment, but I'm running the executable, opening it's block diagram and debugging it.

 

I'm attaching pictures of how I managed to clear the ERR7 and the persistence of the ERR4, and of the Property node note.

 

Thanks in advance,

 

René

 

 

Download All
0 Kudos
Message 10 of 15
(3,593 Views)