Failed uninstall/install of Smartsheet Python SDK

278 views Asked by At

I ran into some issues with the Python SDK. I figured before opening a bug up I'd see if reinstalling would help with any updates. I ran sudo pip uninstall smartsheet-python-sdk and it failed at about 90% trying to uninstall the python-dateutil package. I then reinstalled the smartsheet SDK and it failed to work. I then reinstalled requests, requests-toolbelt, six, certified, python-dateutil and the SDK; using the --force-install and then --ignore-installed to try to reset things. When I run a script that worked before all the installs I get the following error:

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)

Is there a way to reinstall the SDK to properly catch and set any dependancies I'm missing?

1

There are 1 answers

0
polyglot On

I faced a similar error.

You might want to do see if the package is installed there. Try this:

pip freeze

The trick is to add "-H" to the sudo command, run:

sudo -H pip uninstall smartsheet-python-sdk

Now check to see if it was uninstalled:

pip freeze

Next install by the following:

pip install smartsheet-python-sdk

Hope this helps.