-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF-8 error when using ccread #1425
Comments
Hi @cote3804, thanks for the bug report! This isn't actually an issue with cclib at all, but rather with the default behaviour of python's
The problem is that
When you pass a filename to Of course, if you know that the file is not actually in utf-8 (the default encoding), set
For more information on these options to @berquist We should probably add this to the documentation somewhere, as it's likely to crop up again... |
Thanks for the great response @oliver-s-lee. You were indeed correct that changing the encoding to latin-1 fixed the issue. What's puzzling to me is that all of my ORCA files are encoded in UTF-8 except this one log file. Definitely not a cclib issue! |
@cote3804 no problem at all. Yeah that is weird. 99% of the time these encoding errors are caused by umlauts, accents, or other such characters in scientist's names getting printed by the program, but I don't think that's the problem here.
Which I've not seen before, it's almost like the output file got slightly mangled at some point... |
Reopening so we can use this to track the docs update. |
In case anyone else encounters this issue, the ORCA developers acknowledged it is a bug that will be fixed in the next version |
Just repeating the developer's response here as the Orca forums are annoyingly locked behind a sign-up:
|
I'm getting a UTF-8 coding error when trying to parse an ORCA file using ccread:
Which returns this error:
However, if I use ccopen within a script or ccget on the command line, the file is parsed without issue. I need to use a file handle as an input to cclib (not a filename), so I either need to fix this issue with ccread or pass the file handle to the API in some other way that works. I've attached the output file I'm trying to parse:
out.txt
I'm using Python 3.9.13 and cclib 1.8.1
Thanks!
The text was updated successfully, but these errors were encountered: