NameError: name 'file' is not defined
You'll have the error if you write the following code at console.
os.path.dirname(os.path.abspath(__file__))
change your code as follows
os.path.dirname(os.path.abspath("__file__"))
Recommended Posts