django-celerybeat-status icon indicating copy to clipboard operation
django-celerybeat-status copied to clipboard

non-ascii characters in legal break install on Docker

Open digitaldavenyc opened this issue 6 years ago • 6 comments

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)

digitaldavenyc avatar Oct 31 '18 19:10 digitaldavenyc

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

hugobessa avatar Nov 01 '18 16:11 hugobessa

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 avatar Nov 01 '18 17:11 digitaldavenyc

@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

digitaldavenyc avatar Nov 01 '18 17:11 digitaldavenyc

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?

arthurio avatar Jan 22 '19 15:01 arthurio

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

AlonFasta avatar Jul 11 '19 07:07 AlonFasta

any news on this issue ?

arthurbarros avatar Sep 03 '20 15:09 arthurbarros