Uploaded image for project: 'Nuxeo Python Client'
  1. Nuxeo Python Client
  2. NXPY-92

Fix server_info() default value check

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.5
    • Fix Version/s: 2.1.0
    • Component/s: None

      Description

      When the server is not available, server_info() will set a default value to an empty dict. Then, the condition will always be taken and so the call will always be done to the server because an empty dict is evalued to True in Python.

      Sentry Issue: NUXEO-DRIVE-16D

        File "nxdrive\engine\workers.py", line 171, in run
        File "nxdrive\engine\watcher\remote_watcher.py", line 73, in _execute
        File "nxdrive\engine\watcher\remote_watcher.py", line 595, in _handle_changes
        File "nxdrive\engine\activity.py", line 171, in func_wrapper
        File "nxdrive\engine\watcher\remote_watcher.py", line 677, in _update_remote_states
        File "nxdrive\engine\watcher\remote_watcher.py", line 628, in _get_changes
        File "nxdrive\client\remote_client.py", line 481, in get_changes
        File "nxdrive\client\remote_client.py", line 120, in execute
        File "lib\site-packages\nuxeo\operations.py", line 200, in execute
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "lib\site-packages\nuxeo\client.py", line 193, in request
        File "lib\site-packages\requests\sessions.py", line 533, in request
        File "lib\site-packages\requests\sessions.py", line 646, in send
        File "lib\site-packages\requests\adapters.py", line 449, in send
        File "lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
        File "lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
        File "lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
        File "lib\site-packages\urllib3\connection.py", line 364, in connect
        File "lib\site-packages\urllib3\connection.py", line 378, in _match_hostname
        File "__init__.py", line 1337, in error
        File "__init__.py", line 1444, in _log
        File "__init__.py", line 1454, in handle
        File "__init__.py", line 865, in handle
        File "lib\site-packages\nuxeo\client.py", line 81, in __repr__
        File "lib\site-packages\nuxeo\client.py", line 276, in server_version
        File "lib\site-packages\nuxeo\client.py", line 264, in server_info
        File "__init__.py", line 865, in handle
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 minutes
                5m