Skip to content
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

Legacy 3.6 branch UnicodeDecodeError during installation #20

Closed
braun-steven opened this issue Oct 19, 2020 · 2 comments
Closed

Legacy 3.6 branch UnicodeDecodeError during installation #20

braun-steven opened this issue Oct 19, 2020 · 2 comments

Comments

@braun-steven
Copy link
Contributor

braun-steven commented Oct 19, 2020

When running python setup.py install on the legacy_3.6 branch, I'm getting:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-pv1d_p_r/e2cnn/setup.py", line 19, in <module>
    long_description = f.read()
  File "/usr/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 0xc2 in position 6561: ordinal not in range(128)

If I hotfix this by setting long_description = "", the installation works.

(Python 3.6.9)

@braun-steven braun-steven changed the title Legacy 3.6 branch issues Legacy 3.6 branch UnicodeDecodeError during installation Oct 19, 2020
@Gabri95
Copy link
Collaborator

Gabri95 commented Oct 23, 2020

Hi @Steven-LANG

Unfortunately, I am not able to reproduce this issue..

I am trying to install the legacy version with

pip install git+https://github.com/QUVA-Lab/e2cnn@legacy_py3.6

and I am using pip 20.2.2.

I guess the problem is that long_description contains the source of the file README.md, which might have some special characters.

I found a similar problem (and a possible solution) here: https://github.com/facebookresearch/fastText/pull/834/files
They just explicitly add encoding='utf-8' when loading the README file.

However, since I can not reproduce this issue on my machines, I also can not check if this solves the problem.
Would you mind trying it on you machine?

Please, let me know if this solves your problem :)

Gabriele

@braun-steven
Copy link
Contributor Author

braun-steven commented Oct 26, 2020

Sorry, I should have posted the complete environment that I was testing it in. I tried to reproduce it on different machines now with no success.

I was using the nvidia docker cuda-10.1-cudnn7-devel image (ubuntu 18.04 as base) from which the above-mentioned error occurred.

Setting encoding='utf-8' in fact solves the issue.

I'm not sure why this specific setup causes the issue in the first place but it might be a good idea to set it to utf-8 as default for compatibility reasons.

Gabri95 added a commit that referenced this issue Oct 27, 2020
Gabri95 added a commit that referenced this issue Oct 27, 2020
merge #19
fix #20
fix max radius in compute_basis_params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants