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

non-ascii characters in legal break install on Docker #17

Open
digitaldavenyc opened this issue Oct 31, 2018 · 6 comments
Open

non-ascii characters in legal break install on Docker #17

digitaldavenyc opened this issue Oct 31, 2018 · 6 comments

Comments

@digitaldavenyc
Copy link

digitaldavenyc commented Oct 31, 2018

Trying to install this library into debian docker crashes due to non ascii characters in the init.py legal

Collecting django-celerybeat-status==0.0.10 (from -r requirements.txt (line 48))
  Downloading https://files.pythonhosted.org/packages/4f/74/6e847f1ef2718b22e41bc453caaf9e5c394d4f89764d59a9505f222c97a0/django-celerybeat-status-0.0.10.tar.gz
    Complete output from command python setup.py egg_info:
    warning: pypandoc module not found, could not convert Markdown to RST
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-hvSsLc/django-celerybeat-status/setup.py", line 52, in <module>
        version = get_version('celerybeat_status')
      File "/tmp/pip-install-hvSsLc/django-celerybeat-status/setup.py", line 23, in get_version
        init_py = open(os.path.join(package, '__init__.py')).read()
      File "/usr/lib/python2.7/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 176: ordinal not in range(128)
@hugobessa
Copy link
Collaborator

can you share a Dockerfile where this exception is raised @digitaldavenyc?

@digitaldavenyc
Copy link
Author

FROM debian:jessie-slim

WORKDIR /var/app

ENV PYTHONPATH $PYTHONPATH:/var/app

RUN apt-get update
RUN apt-get install -y libsnappy-dev libyaml-dev python-pip git libjpeg-dev libffi-dev python-dev libxml2-dev libxslt1-dev zlib1g-dev libpq-dev python
RUN pip install --upgrade pip

COPY . ./

RUN pip install -r requirements.txt

EXPOSE 8000

CMD ./bin/boot

@digitaldavenyc
Copy link
Author

@hugobessa It's during the pip install for all the requirements.txt libraries.

I think the simplest fix is to remove all the non-ascii characters from the __init__.py file because they aren't compatible with Python 2.x strings

@arthurio
Copy link

I can install it locally (mac) with python 2.7.15 but it fails in docker (Using a ubuntu image). Would it be possible to remove the non-ascii characters as @digitaldavenyc suggested?

@AlonFasta
Copy link

This issue reproduces with CentOS6.5 and Python 3.6.
The issue started on version 0.0.7 (0.0.6 installation runs successfully)

@arthurbarros
Copy link

any news on this issue ?

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

5 participants