Error 1746 Occurred at Open Venv Python Session in LabVIEW

Updated Aug 23, 2023

Reported In

Software

  • LabVIEW

Programming Language

  • Python

Issue Details

I am trying to open a session to a Python virtual environment in LabVIEW, but this error is being reported:

Error 1746 occurred at Open Venv Python Session.vi

Possible reason(s):
LabVIEW: (Hex 0x6D2) The path to the Venv virtual environment was not found.



image.png

Solution

This error is caused by LabVIEW not being able to correctly locate the virtual environment folder, to solve this make sure you are pointing the Open Venv Python Session VI to the root folder of the virtual environment and not a file within the folder where the virtual environment was created.

Setting a file within the virtual environment as the path for the session will produce the error:

image.png

Select the root folder of the virtual environment to avoid the 1746 error:

image.png

Additional Information

If you are using Path Controls you can change their Browse Options to select folders instead of files, for more information refer to: Configuring Browse Options of Path Controls.

You may encounter error 1671 in LabVIEW 2023 Q1 if the path to the virtual environment contains spaces, this is a known issue in the 2023 Q1 version that was fixed in LabVIEW 2023 Q3.