02-26-2026 11:18 AM
I have been given a python function whose parameter is a filename.
How do deal with the filename when the file data type is not supported?
I believe this is a common use case. Basically I just need to know how to call a python function with a filename parameter.
I have tried to use a string (see code example below), but to no avail.
I get Error 1667 occurred at Python Node in MyString.vi->Call MyString.vi
Python code
--------------------
import math
import numpy as np
from pathlib import Path
def load_my_file(my_string):
"""Loads a file and returns the name."""
filepath = Path(my_string)
return my_string
From Help >>>>
02-26-2026 03:30 PM
LabVIEW node Path To String. That's it!
02-27-2026 03:45 PM
Thank you. I will check that out.