The following call fails with an error
doc = nuxeo.repository().fetch('/my domain')
=> error
Traceback (most recent call last): File "idol_my_folders.py", line 73, in <module> doc = nuxeo.repository().fetch('/domaine echange') File "/usr/local/lib/python2.7/dist-packages/nuxeo/repository.py", line 33, in fetch return Document(self.get(path), self) File "/usr/local/lib/python2.7/dist-packages/nuxeo/repository.py", line 24, in get return self._service.request(self._get_path(path), extra_headers=self._get_extra_headers()) File "/usr/local/lib/python2.7/dist-packages/nuxeo/nuxeo.py", line 630, in request resp = self.opener.open(req, timeout=timeout) File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/local/lib/python2.7/dist-packages/poster/streaminghttp.py", line 142, in http_open return self.do_open(StreamingHTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1202, in do_open r = h.getresponse(buffering=True) File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 453, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 409, in _read_status line = self.fp.readline(_MAXLINE + 1) File "/usr/lib/python2.7/socket.py", line 480, in readline data = self._sock.recv(self._rbufsize) socket.timeout: timed out
Using urllib.quote seems to fix the problem as the following call returns the result without error
doc = nuxeo.repository().fetch(urllib.quote('my domain'))