【问题标题】:Failed uninstall/install of Smartsheet Python SDK卸载/安装 Smartsheet Python SDK 失败
【发布时间】:2016-12-28 19:39:13
【问题描述】:

我在使用 Python SDK 时遇到了一些问题。我想在打开错误之前我会看看重新安装是否有助于任何更新。我运行了sudo pip uninstall smartsheet-python-sdk,它在尝试卸载 python-dateutil 包时失败了大约 90%。然后我重新安装了 smartsheet SDK,但它无法工作。然后我重新安装了requests、requests-toolbelt、六、认证、python-dateutil和SDK;使用 --force-install 然后 --ignore-installed 尝试重置。当我运行在所有安装之前运行的脚本时,我收到以下错误:

Traceback (most recent call last):
  File "./smytest.py", line 212, in <module>
    SMUTrackerSmartsheet=smartsheet.Sheets.get_sheet(SMARTSHEET_SMU_TRACKER_SHEET_ID)
  File "/Library/Python/2.7/site-packages/smartsheet/sheets.py", line 460, in get_sheet
    response = self._base.request(prepped_request, expected, _op)
  File "/Library/Python/2.7/site-packages/smartsheet/smartsheet.py", line 178, in request
    res = self.request_with_retry(prepped_request, operation)
  File "/Library/Python/2.7/site-packages/smartsheet/smartsheet.py", line 242, in request_with_retry
    return self._request(prepped_request, operation)
  File "/Library/Python/2.7/site-packages/smartsheet/smartsheet.py", line 210, in _request
    raise UnexpectedRequestError(rex.request, rex.response)
smartsheet.exceptions.UnexpectedRequestError: (<PreparedRequest [GET]>, None)

有没有办法重新安装 SDK 以正确捕获和设置我缺少的任何依赖项?

【问题讨论】:

    标签: smartsheet-api


    【解决方案1】:

    我遇到了类似的错误。

    您可能想看看那里是否安装了软件包。试试这个:

    pip freeze
    

    诀窍是在sudo命令中添加“-H”,运行:

    sudo -H pip uninstall smartsheet-python-sdk
    

    现在检查它是否被卸载:

    pip freeze
    

    接下来通过以下方式安装:

    pip install smartsheet-python-sdk
    

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2018-05-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多