命令行同步工具安装出错

hi hepo!

重装系统,Ubuntu 18.04环境,重新安装bitcron命令行工具的时候报错,以前从来没遇到过,懵逼

mrx@pc:~$ sudo apt install python-pip
正在读取软件包列表... 完成

正在分析软件包的依赖关系树      

正在读取状态信息... 完成      

下列【新】软件包将被安装:

  python-pip

升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。

需要下载 151 kB 的归档。

解压缩后会消耗 672 kB 的额外空间。

获取:1 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/universe amd64 python-pip all 9.0.1-2.3~ubuntu1.18.04.1

已下载 151 kB,耗时 9秒 (16.9 kB/s)                                            

正在选中未选择的软件包 python-pip。

(正在读取数据库 ... 系统当前共安装有 358627 个文件和目录。)

正准备解包 .../python-pip_9.0.1-2.3~ubuntu1.18.04.1_all.deb  ...

正在解包 python-pip (9.0.1-2.3~ubuntu1.18.04.1) ...

正在处理用于 man-db (2.8.3-2ubuntu0.1) 的触发器 ...

正在设置 python-pip (9.0.1-2.3~ubuntu1.18.04.1) ...

mrx@pc:~$ pip install bitcron

Collecting bitcron

Exception:

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main

    status = self.run(options, args)

  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run

    wb.build(autobuilding=True)

  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build

    self.requirement_set.prepare_files(self.finder)

  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files

    ignore_dependencies=self.ignore_dependencies))

  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file

    require_hashes

  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link

    self.link = finder.find_requirement(self, upgrade)

  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 465, in find_requirement

    all_candidates = self.find_all_candidates(req.name)

  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 423, in find_all_candidates

    for page in self._get_pages(url_locations, project_name):

  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_pages

    page = self._get_page(location)

  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 683, in _get_page

    return HTMLPage.get_page(link, session=self.session)

  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 792, in get_page

    "Cache-Control": "max-age=600",

  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 533, in get

    return self.request('GET', url, **kwargs)

  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 386, in request

    return super(PipSession, self).request(method, url, *args, **kwargs)

  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 520, in request

    resp = self.send(prep, **send_kwargs)

  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 652, in send

    history = [resp for resp in gen] if allow_redirects else []

  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 234, in resolve_redirects

    **adapter_kwargs

  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 630, in send

    r = adapter.send(request, **kwargs)

  File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send

    resp = super(CacheControlAdapter, self).send(request, **kw)

  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/adapters.py", line 405, in send

    conn = self.get_connection(request.url, proxies)

  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/adapters.py", line 303, in get_connection

    proxy_manager = self.proxy_manager_for(proxy)

  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/adapters.py", line 197, in proxy_manager_for

    **proxy_kwargs)

  File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/poolmanager.py", line 440, in proxy_from_url

    return ProxyManager(proxy_url=url, **kw)

  File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/poolmanager.py", line 385, in __init__

    proxy = parse_url(proxy_url)

  File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/util/url.py", line 199, in parse_url

    raise LocationParseError(url)

LocationParseError: Failed to parse: :::8787

怎样能fix这个问题?

2019-07-19 16:38 from Muyun Xiao
Comments
Write a Comment
  • @Hepo 安装的问题似乎fix了,但是还是无法同步,很神秘,不管是同步到服务器还是从服务器同步都不行

    $ bitcron 【token打码】

    site token is stored in /home/mrx/文档/Blogger/.sync/site_token.config now, do not public this file to anyone else.

    $ bitcron sync

    under /home/mrx/文档/Blogger now

    $ bitcron sync

    under /home/mrx/文档/Blogger now

    $ bitcron

    under /home/mrx/文档/Blogger now

    2019-07-22 08:42:55 start to sync now

    2019-07-22 08:42:55 site TOKEN error or network connection error

    • Hepo reply

      @矩阵良

      site TOKEN error or network connection error

      TOKEN 没错,那就是 network 的问题,换个节点试试。

      • @Hepo 似乎也不行【

        $ bitcron jp.bitcron.com

        under /home/mrx/文档/Blogger now

        current node on jp.bitcron.com now

        $ bitcron sync

        under /home/mrx/文档/Blogger now

        $ bitcron

        under /home/mrx/文档/Blogger now

        2019-07-22 11:03:20 start to sync now

        2019-07-22 11:03:21 site TOKEN error or network connection error

      • @Hepo 从服务器同步回来似乎连开始同步都不能触发,这个比较令人恼火【……

        • Hepo reply

          @矩阵良

          抱歉,我试了下,工作正常。

          2019-07-22 11:03:20 start to sync now

          2019-07-22 11:03:21 site TOKEN error or network connection error

          从开始到报错,只有 1s 的时间,不是 Token 就是 network,timeout 都不可能。

          这个命令行的代码是开放的,只能自己 debug 了。

        • Hepo reply

          @矩阵良 另外,你可以试试连手机热点等多种方式,排除 network 的原因。

          • @Hepo 已经抱着笔记本辗转了几个办公室尝试不同的wifi和手机热点了,都不行,太丧了

          • @Hepo 嚯,想了一下把网络设置重置了一下,发现问题解决了……打扰hepo辽【【【