-
Notifications
You must be signed in to change notification settings - Fork 8
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
Specify encoding for files #62
Comments
Can you please show the error and traceback? |
There is no traceback provided by the program, only the message for the raised exception: CRITICAL: Parsing failed. Exception: 'charmap' codec can't decode byte 0x8f in position 1132: character maps to As expected, I managed to run the program on WSL, though. |
Having the same issue. Thanks for the heads up |
There was a similar issue in Annif and it was fixed by this PR. But in Annif the input files are in text-based formats, not RDF (mostly). I wonder what file caused this. Normally Skosify only parses the configuration file (optional) and RDF files. Can you try to work out which file caused this and perhaps post a minimal example file that causes the error? The error message seems to come from this line and is shown when the input RDF file cannot be parsed. But the parsing itself is handled by rdflib and in my understanding it should do the right thing w.r.t. character encodings - but apparently this isn't always the case. My wishlist (for @kouralex or @libraryjeans):
|
Hello, I have the same problem. Python 3.8 installed with Powershell. |
Possible fix on this branch: https://github.com/NatLibFi/Skosify/tree/issue62-utf8-encoding |
Looks like it worked, at least the file has been analyced. Good! skosify -i .\yso-paikat-skos.rdf -o test.rdf |
Hello, I'm having this problem on Windows 10 Pro with Python 3.8.5. On cmd, when I try to run the script on yso-skos.rdf (obtained from Finto.fi) I get the following error: CRITICAL: Parsing failed. Exception: 'charmap' codec can't decode byte 0x9d in position 14043: character maps to . The script works as intended on a Ubuntu installation through WSL. |
Whilst trying to run Skosify on Windows, I encountered issues similar to this.
The answer there was to simply declare the encoding when you open a file. Supporting this user case requires some small changes in the code as well as a new parameter to the program, I suppose.
The text was updated successfully, but these errors were encountered: