I've seen some people with the same error but all the solutions I tried that were provided to them, didn't work for me. I'm trying to read a file in Python with utf-8 characters but the error "'utf-8' codec can't decode byte 0xe1 in position 2: unexpected end of data" is shown when some "á" or alike appears, although I specified in the code to encode it with utf-8.
input = input("File: ")
epa = open(input, encoding="utf-8")
print(epa.read())
I had it working before, I don't know what did I do for it to stop working with encoding. There's more code, where I'm writing in the file (that worked) but now I've deleted all of it to see if this error remains and it does.