简体   繁体   English

随地吐痰UnicodeDecode错误

[英]Pip spitting UnicodeDecode error

I'm not 100% positive as to what is the correct place to post this question since it's 50% programming since it's a python bug and 50% system management, since it's a bug on a package. 对于发布此问题的正确位置,我不是100%肯定的,因为这是50%的编程,因为它是python的错误,而50%的系统管理是因为在软件包上的错误。 I went on to post here, If I'm incorrect please direct me to the right place. 我继续在这里发帖,如果我不正确,请引导我到正确的地方。

I'm currently running Arch Linux 64 bit and earlier today I updated a couple of packages including the (critical I believe) python-setuptools . 我目前正在使用64位Arch Linux,今天早些时候我更新了几个软件包,包括python-setuptools (很关键)。 Before this pip worked perfectly, no issues whatsoever, now however just from running the bare command I get the following: 在此pip完美运行之前,没有任何问题,但是现在只要运行裸命令,我就会得到以下信息:

espaco@Arch ~> pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3143, in <module>
    @_call_aside
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3129, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3156, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 649, in _build_master
    ws = cls()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 642, in __init__
    self.add_entry(entry)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 698, in add_entry
    for dist in find_distributions(entry, True):
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2136, in find_on_path
    path_item, entry, metadata, precedence=DEVELOP_DIST
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2518, in from_location
    version = cls._version_from_metadata(dist_path) or version
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2841, in _version_from_metadata
    return _version_from_file(strm)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2483, in _version_from_file
    line = next(iter(version_lines), '')
  File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 116: ordinal not in range(128)

Is this something I did wrong or does pip have a bug? 这是我做错了还是pip有错误? How would I be able to fix this? 我将如何解决这个问题?

What I have tried: 我尝试过的

  • Reinstalling pip 重新安装点子
  • Reinstalling python-setuptools 重新安装python-setuptools
  • The almighty reboot 万能的重启
  • Ask my mom to kiss bash in the forehead 让我妈妈在额头上亲吻bash
  • Search the Arch package list for a bug report 在Arch软件包列表中搜索错误报告
  • Google the problem 谷歌的问题
$ ll /var/cache/pacman/pkg/python-setuptools-*

then select desired version, and 然后选择所需的版本,然后

$ sudo pacman -U /var/cache/pacman/pkg/python-setuptools-1:18.7-1-any.pkg.tar.xz

where 1:18.7-1 is your previous version of the package 其中1:18.8.1是您的软件包的先前版本

if it will not help: 如果没有帮助:

$ cat /var/log/pacman.log | grep 2015-11-30 | grep upgraded

and then for each package install it's previous version by doing part 1 然后为每个软件包安装第1部分的先前版本

you can write a script for that or find existing. 您可以为此编写脚本或查找现有脚本。

also try to search arch community forums 也尝试搜索拱门社区论坛

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM