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

Encoding error in _log_details

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Story Points:
      1

      Description

      Reproduction:

      from nuxeo import Nuxeo
      
      nuxeo = Nuxeo(
          base_url='http://localhost:8080/',
        auth={
          'username': 'Administrator',
          'password': 'Administrator'
        })
      
      nuxeo.repository().fetch('/')
      

      The base_url is invalid and triggers the following error:

      Traceback (most recent call last):
        File "/Users/lea/sandbox/tt.py", line 10, in <module>
          nuxeo.repository().fetch('/')
        File "/Users/lea/projects/nuxeo-python-client/nuxeo/repository.py", line 43, in fetch
          return Document(self.get(path), self)
        File "/Users/lea/projects/nuxeo-python-client/nuxeo/repository.py", line 34, in get
          self._get_path(path), extra_headers=self._get_extra_headers())
        File "/Users/lea/projects/nuxeo-python-client/nuxeo/nuxeo.py", line 711, in request
          self._log_details(e)
        File "/Users/lea/projects/nuxeo-python-client/nuxeo/nuxeo.py", line 755, in _log_details
          if '<html>' in detail:
      UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 44: ordinal not in range(128)
      

        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 - 30 minutes
                30m