Python: Error on Module Run for File Conversion
Go to solution
Solved by Azgoth 2,
I haven't looked at the file, but I run into errors like this from time to time. Try changing all of your open() functions to include the encoding="UTF8" argument. Python says it opens with UTF-8 encoding by default, but I find that sometimes not specifying the encoding causes errors like this, and specifying the file encoding often solves the issue for me.
Also, just as a note, I recommend using the with context manager keyword for dealing with files. It helps protect against weird things happening that might accidentally cause the file to be left open, which can sometimes cause issues further down a program.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now