import os
directory = os.getcwd
if os.path.exists(directory + "\\token.txt"):
print('token file aleady exists. terminating token setup')
else:
tokenfile = open("token.txt", "x")
the error is coming from this line: if os.path.exists(directory + "\token.txt"). I am not sure how to fix this error. can anyone help?
Python functions must be called with () after the method name.
The correct code you need is: