Jan-25-2019, 11:08 PM
I am currently doing a project that requires storing a lot of data, in the form of a list of dictionaries. Currently, I do this by writing it to a text file, and then using exec on the string we get from reading the file.
Unfortunately, I cannot get anything from one of the files. I can extract it as a string, but when I call exec on it, I get the following error:
SyntaxError: invalid character in identifier
I assume there's just a bad character somewhere in the file, but I'm not sure. Is there some automated tool for finding invalid characters in text files?
Unfortunately, I cannot get anything from one of the files. I can extract it as a string, but when I call exec on it, I get the following error:
SyntaxError: invalid character in identifier
I assume there's just a bad character somewhere in the file, but I'm not sure. Is there some automated tool for finding invalid characters in text files?