I am using the following f-strings in a web application. When I run it locally (before trying on the web) I am getting a name error:
NameError: name 'path' is not defined
But path prints properly and seems to be defined to my mind. What am I doing wrong?
path = f'{PROJECT_PATH["raw_data"]}/cashValues'
print("PATH", path)
filenames = [f'{path}/{i}' for i in filenames]
Thanks
Full traceback:
Traceback (most recent call last):
File "scripts/TableTransform.py", line 8, in <module>
class TableTransform(object):
File "scripts/TableTransform.py", line 14, in TableTransform
Filenames = [f'{path}/{i}' for i in filenames]
File "scripts/TableTransform.py", line 14, in <listcomp>
Filenames = [f'{path}/{i}' for i in filenames]
NameError: name 'path' is not defined