UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5439: character maps to <undefined>

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5439: character maps to <undefined>

Moslem
hi Jiba
I have below error when i use below UMLS version :
1- umls-2018AB-full.zip
2- umls-2019AA-full.zip

My error :
"
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5439: character maps to
    <undefined> 
 "
can help me?
thanks a lot
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5439: character maps to <undefined>

Jiba
Administrator
Hi,

This is an encoding problem. I fixed such a problem a few days ago in the development version of Owlready (on BitBucket), can you try it?

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5439: character maps to <undefined>

tomhemmes
This post was updated on .
Hi Jiba,

I am really eager to start experimenting with Owlready, however I am experiencing the same issue.

Action:

1. pip install Owlready2

*Error*:

```
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-jtqujsqd/setup.py", line 28, in <module>
        version = open(os.path.join(HERE, "__init__.py")).read().split('VERSION = "', 1)[1].split('"', 1)[0]
      File "/home/tom/portaal/env/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 119: ordinal not
in range(128)
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-jtqujsqd/
```

*Attempts*:

I tried
- cloning "hg clone https://bitbucket.org/jibalamy/owlready2"
- "pip install ../owlready2"
- "pip3 install ../owlready2"

*Environment*:

Ubuntu Xenial 16.04
Python 3.6.5

*Temp fix*:

I fixed it for now by removing the VERSION retrieval from __init__.py. I do not see why you would use this construction anyways. If you ever need the version of the package you can just use `Owlready2.__version__`?
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5439: character maps to <undefined>

moslem
thanks a lot jiba for your answer.
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5439: character maps to <undefined>

Jiba
Administrator
In reply to this post by tomhemmes
Hello,

Did you encounter the UnicodeDecodeError when trying to import UMLS data, or when installing Owlready 2?

If you want to import UMLS, please try with the development version on BitBucket, I fixed an encoding error recently.

If it is when installing Owlready, could you give me the entire error message (with the traceback) please?

Best regards,
Jean-Baptiste Lamy
MCF HDR, Laboratoire LIMICS, Université Paris 13