question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnicodeDecodeError when installing ansible

See original GitHub issue

Hi,

I installed pipenv 7.4.3, and trying to install ansible (pipenv install ansible) i get this traceback:

Adding ansible to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
  File "/Users/marcink/.virtualenvs/cli/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/cli.py", line 1555, in install
    do_lock(system=system)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/cli.py", line 965, in do_lock
    project=project
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/utils.py", line 222, in resolve_deps
    resolved_tree = resolver.resolve()
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/piptools/resolver.py", line 195, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/piptools/resolver.py", line 274, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 145, in get_dependencies
    self._dependencies_cache[ireq] = reqset._prepare_file(self.finder, ireq)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/patched/pip/download.py", line 821, in unpack_url
    hashes=hashes
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/patched/pip/download.py", line 663, in unpack_http_url
    unpack_file(from_path, location, content_type, link)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 605, in unpack_file
    untar_file(filename, location)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 551, in untar_file
    path = os.path.join(location, fn)
  File "/Users/marcink/.virtualenvs/cli/lib/python2.7/posixpath.py", line 73, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 66: ordinal not in range(128)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AlJohricommented, Sep 21, 2017

@marcinkuzminski more specifically, this seems like a pip-tools issue

related issues:

if you read through some of the issues, people have a lot of issues reproducing this bug.

10 minutes later and the same command doesn’t give exception. Everything is 100% the same. Git reset same. https://github.com/jazzband/pip-tools/issues/439#issuecomment-273664824

Unfortunately, after fixing it once with @byjott’s approach, I was unable to reproduce - if you’re debugging, watch out! I can reproduce at-will now though, if anyone would like more info. https://github.com/jazzband/pip-tools/issues/433#issuecomment-277825142

0reactions
kennethreitzcommented, Sep 21, 2017

let’s get this fixed in pip-tools then!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ansible-galaxy install throws UnicodeDecodeError exception
No translations currently exist. Issue. When running the command ansible-galaxy install it throws the exception below: Raw. Traceback ( ...
Read more >
Ansible become_user error UnicodeEncodeError: 'ascii' codec ...
This means that remote system printed something non-ascii into stderr as error message. As you said, you run Ansible 2.2.0.0, so you can...
Read more >
'ascii' codec can't encode character u'\xa0' in position 84
When I run a simple playbook, on some servers I get a UnicodeEncodeError and the playbook is not executed. I have the role...
Read more >
Installing Ansible
Installing Ansible . Ansible is an agentless automation tool that you install on a single host (referred to as the control node). From...
Read more >
Installing Ansible Runner — ansible-runner 2.0.0 documentation
pip install virtualenvwrapper $ mkvirtualenv ansible-runner $ pip install -e . ... Fix some unicode issues when using command line override on python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found