LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Python Node and HTTP Port Access

I'm using Python along with the Microsoft MSAL library to access a SharePoint site via Graph API. As part of the authentication process, Python launches a web browser for the user to sign-in to their Microsoft account, and it listens for a callback on a port (I can specify the number) for the authentication result. This works flawlessly in Python, but when calling the module through the Python Node in LabVIEW, it immediately throws an error that it's unable to listen to the specified port.

 

Is there any resolution to this issue? Or is this just not possible using the Python Node?

 

For reference, I'm using LabVIEW 2019 and Python 3.8.10. The MSAL method being used is PublicClientApplication.acquire_token_interactive.

0 Kudos
Message 1 of 3
(61 Views)

Instead of using the Python Node, try calling the Python script directly using the exe VI. This will cause the script to use the Python instance associated with your PATH variable. The advantage of this is that you have more control over the Python environment associated with the PATH. Also, depending on how you are calling the Python script that works, you might be using the same Python environment so it has a better chance of working. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 2 of 3
(33 Views)

Jay14159265_0-1734714370096.png

You can call the Python module like this 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 3 of 3
(29 Views)