Login  Register

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

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

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

Moslem
10 posts
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
| More
Print post
Permalink

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

Jiba
Administrator
1186 posts
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
| More
Print post
Permalink

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

tomhemmes
2 posts
This post was updated on May 31, 2019; 7:22am.
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
| More
Print post
Permalink

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

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

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

Jiba
Administrator
1186 posts
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