I have really weird syntax error. In the first time the code works fine but after that it doesnt works.
MailName={}
string = ""
#pdb.set_trace()
fp=open("C:\\Users\\Dvir\\Dropbox\\chat\\cred.txt","a+")
#pdb.set_trace()
try:
string=fp.read()
except:
string=""
if (string !=""):
MailName = eval(string)
The problematic code is:
MailName = eval(string)
The syntax error:
MailName = eval(string) File "<string>", line 2 {'familyname': 'josh', 'pass': 'UGGlXJCpl', 'email': 'chat@gmail.com', 'n ame': 'justin'}
^ SyntaxError: invalid syntax
When I use that part of code in the first time it works perfecly but after that it shows me syntax error which is weird because it's a valid dictionary.