ara-collection icon indicating copy to clipboard operation
ara-collection copied to clipboard

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

Open erolg opened this issue 4 years ago • 1 comments

TASK [recordsansible.ara.ara_api : Install ara] ********************************************************************************************************************************************************************************************************************************
Monday 01 March 2021  23:39:36 +0300 (0:00:08.330)       0:01:13.597 **********
fatal: [test]: FAILED! => changed=false
  cmd:
  - /usr/bin/pip3
  - install
  - /home/ubuntu/.ara/git/ara[server]
  msg: |-
    stdout: Processing /home/ubuntu/.ara/git/ara
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-upmoc8ze-build/setup.py", line 22, in <module>
            pbr=True)
          File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 128, in setup
            _install_setup_requires(attrs)
          File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 121, in _install_setup_requires
            dist.parse_config_files(ignore_option_errors=True)
          File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 491, in parse_config_files
            _Distribution.parse_config_files(self, filenames=filenames)
          File "/usr/lib/python3.6/distutils/dist.py", line 395, in parse_config_files
            parser.read(filename)
          File "/usr/lib/python3.6/configparser.py", line 697, in read
            self._read(fp, filename)
          File "/usr/lib/python3.6/configparser.py", line 1015, in _read
            for lineno, line in enumerate(fp, start=1):
          File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
            return codecs.ascii_decode(input, self.errors)[0]
        UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2661: ordinal not in range(128)

        ----------------------------------------

    :stderr: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-upmoc8ze-build/

OS: Ubuntu 18.04 ansible 2.10.3 config file = None configured module search path = ['/Users/erol.guzoglu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.10.3_1/libexec/lib/python3.9/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.9.1 (default, Feb 3 2021, 07:38:02) [Clang 12.0.0 (clang-1200.0.32.29)]

Works if I set environment vars:

  - name: Install Ara Api
     include_role:
     name: recordsansible.ara.ara_api
     apply:
        environment:
           LANG: en_US.UTF-8
           LC_ALL: en_US.UTF-8

erolg avatar Mar 01 '21 22:03 erolg

Hey @erolg and thanks for the issue.

I haven't seen this occur before. Are you using a particular locale or charset on your system and out of curiosity, are you able to reproduce the issue by installing ara[server] directly with pip ?

I'd like to isolate whether this is an issue with Ansible's pip module or pip itself.

In addition, I could be mistaken but isn't /usr/local/Cellar something from MacOS' homebrew ? Is it because you're deploying from MacOS to a Ubuntu machine ?

dmsimard avatar Mar 02 '21 02:03 dmsimard