-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Click-based recipes on Python 3 #4961
Comments
I can only second that! It is really annoying I tracking a bug in python that should suppose to fix this in python2.7. Part of the problem is that click is not really recommending python3k - actually reading the docu it seems they say - py3k good luck. Thats one of the reasons we disabled it. However, we provided a workaround for this problem if it is really needed to get it running under py3k by using a different base Docker image. |
To be fair, there seem to be no issues with py3k as long as the environment ships a utf-8 locale like The base image here seems to have it. Maybe it also needs [EDIT] It seems that you may need to generate the locale first with # Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8 [EDIT] |
@nvictus Ubuntu is a huge image with many things preinstalled. We test against busybox with nothing installed and also no UTF-8 available. Does this help? http://click.pocoo.org/6/python3/#unicode-literals
|
Looks like C locale coercion to UTF-8 was implemented in Python 3.7 as PEP 538. This works only if the locale is available in the system, so presumably it still won't work on the busybox images. |
@nvictus we have now a workaround for this using a either this:
bioconda-recipes/recipes/ggplot/meta.yaml Line 47 in f575c10
Are you at GCC/BOSC this year? |
* Adding sierrapy * Try without noarch * noarch is back, this builds ok with * click needs locale as specified in #4961 * Try --help only * Try en_US * Use extendede image
Hello, I tried now all possible solutions and no success.
I get the error
When using
I get the error:
When using
I got the error:
I now removed the commands from #13532 , but has anybody a better solution? |
I managed to get it work using both solutions:
|
I noticed that all py3k builds for recipes depending on click have been disabled due to what I assume is locale detection or configuration issues.
Maybe it's worth opening a discussion with the Click devs. They seem to be very opinionated about supporting only properly configured utf8 locales. Ideally, it would be great if they provided an explicit way to downgrade the locale runtime error to a warning, because sometimes you really can't control locale. On the other hand, if Click is falsely flagging the container environments as misconfigured, then we should raise an issue there.
It might also be worth pointing out that bioinformatics is so ASCII-oriented that surrogate escapes isn't an issue we are likely to encounter very often.
Btw, in
cooler
, I circumvented this with a dirty monkey patch that prevents locale detection because I also experienced issues deploying to containers I couldn't configure.The text was updated successfully, but these errors were encountered: