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

Reading the README.rst file throws encoding errors on some systems. #26

Closed
weaverba137 opened this issue Sep 22, 2016 · 4 comments
Closed
Assignees
Labels

Comments

@weaverba137
Copy link
Member

I'm trying to test installs of desimodel on the new DESI+Anaconda infrastructure.

I'm using the desi-conda/3.5-20160913 module on both edison and datatran. I'm also using the current desi-conda branch of desiutil. On datatran, everything installs fine, but on edison, when the setup.py file tries to read the README.rst file, it complains:

Error during installation: Traceback (most recent call last):
  File "setup.py", line 38, in <module>
    setup_keywords['long_description'] = readme.read()
  File "/global/common/edison/contrib/desi/conda/conda_3.5-20160913/lib/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 3401: ordinal not in range(128)

In fact, if you look closely at the README.rst file for desimodel, it is not ASCII, it contains µ characters.

So which is more mysterious: that the install succeeded on datatran or that it failed on edison?

@weaverba137
Copy link
Member Author

Hmmm, here's a possible clue. On datatran, the environment variable LANG=en_US.UTF-8. On edison I don't have LANG set at all.

@weaverba137
Copy link
Member Author

And, I think I just answered my own question.

@sbailey
Copy link
Contributor

sbailey commented Sep 23, 2016

I also just removed the μ symbol from the README. Although UTF-8 should be supported everywhere, in practice it isn't and there isn't really any benefit to have "μm" instead of "microns" in the README file.

Related: while preparing an optical distortion data file, we received a text file that was inherited from Mike Sholl, generated on Windows. I could see it fine with μm units in gmail/safari and textmate; @dkirkby saw it as a Chinese character (in gmail); another engineer (on Windows) saw it as a 5m, and when I loaded it into Word it was some box-drawing double bar symbol. In the end we're writing an ASCII only file with "microns"...

@moustakas
Copy link
Member

um is another acceptable possibility for "microns".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants