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

Ubuntu doesn't like the "ü" in __init__.py #47

Open
mtbentley opened this issue Oct 10, 2014 · 6 comments
Open

Ubuntu doesn't like the "ü" in __init__.py #47

mtbentley opened this issue Oct 10, 2014 · 6 comments

Comments

@mtbentley
Copy link

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48: ordinal not in range(128)

@gregmuellegger
Copy link
Owner

Thanks for the report, but that's not exactly a lot of information :)
When exactly is this happening, when executing pip install django-mobile or where else?
Please re-open if this is till valid to you.

@mtbentley
Copy link
Author

It seems the "ü" in your name causes character encoding problems with python 3 on Ubuntu.
# pip3 install django-mobile

Downloading/unpacking django-mobile
  Downloading django-mobile-0.4.0.tar.gz
  Running setup.py (path:/tmp/pip_build_root/django-mobile/setup.py) egg_info for package django-mobile
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/django-mobile/setup.py", line 64, in <module>
        version = get_version('django_mobile'),
      File "/tmp/pip_build_root/django-mobile/setup.py", line 24, in get_version
        init_py = open(os.path.join(package, '__init__.py')).read()
      File "/usr/lib/python3.4/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 48: ordinal not in range(128)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/django-mobile/setup.py", line 64, in <module>

    version = get_version('django_mobile'),

  File "/tmp/pip_build_root/django-mobile/setup.py", line 24, in get_version

    init_py = open(os.path.join(package, '__init__.py')).read()

  File "/usr/lib/python3.4/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 48: ordinal not in range(128)

# pip3 --version
pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)

# python3 --version
Python 3.4.0

@gregmuellegger
Copy link
Owner

Hm, strange. I cannot reproduce. The installation works fine for me:

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ sudo pip3 install django-mobile
Downloading/unpacking django-mobile
  Downloading django-mobile-0.4.0.tar.gz
  Running setup.py (path:/tmp/pip_build_root/django-mobile/setup.py) egg_info for package django-mobile

Installing collected packages: django-mobile
  Running setup.py install for django-mobile

Successfully installed django-mobile
Cleaning up...

These are my versions:

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ python3 --version
Python 3.4.0
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ pip3 --version
pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)

Can you please post your ubuntu version and your locale in use?

For me it's:

vagrant@vagrant-ubuntu-trusty-64:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:        14.04
Codename:       trusty

vagrant@vagrant-ubuntu-trusty-64:~$ locale -a
C
C.UTF-8
en_US.utf8
POSIX

@gregmuellegger gregmuellegger reopened this Feb 9, 2015
@mtbentley
Copy link
Author

This is running in a Docker image, so it's possible that that 's causing the problem. I'll try it with a real VM later.

root@58c7bb8a1982:/# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty
root@58c7bb8a1982:/# locale -a
C
C.UTF-8
POSIX
root@58c7bb8a1982:/

If I add en_US.utf8 to my locales w/ locale-gen en_US.UTF-8 I still get the same error.

@gregmuellegger
Copy link
Owner

Ok, strange. I have not used docker so far, so I'm not able to test there. Did you had any success with using a pure Ubuntu Image in a VM?

@gregmuellegger
Copy link
Owner

Maybe #58 is related?

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