AnsweredAssumed Answered

problems using python cmislib uploading to 5.0.d

Question asked by idwright on Nov 27, 2015
Latest reply on Dec 4, 2015 by idwright
I've just upgraded from 4.2.f to 5.0.d and am having problems with a very simple python script used to upload a file via CMIS

I've tried changing the service url from /alfresco/cmisatom to /alfresco/api/-default-/public/cmis/versions/1.0/atom but if anything that makes it more unhappy (firstly crashes because of an empty repository name, then if I hard code the name to '-default-' crashes again see below)

The access log on the server seems to indicate a 401 for the POST (For GET there seems to be a 401 followed by a 200)

With alfresco/cmisatom the script doesn't fail but it doesn't upload the file either

Using cmislib==0.5.1

The CMIS workbench uploads a file OK. (no 401)

Has anybody got any thoughts on this?

Thanks


  File "/home/iwright/test/cmis/local/lib/python2.7/site-packages/cmislib/model.py", line 2758, in createDocument
    contentEncoding)
  File "/home/iwright/test/cmis/local/lib/python2.7/site-packages/cmislib/model.py", line 1187, in createDocument
    result = self._cmisClient.post(postUrl.encode('utf-8'), xmlDoc.toxml(encoding='utf-8'), ATOM_XML_ENTRY_TYPE)
  File "/home/iwright/test/cmis/local/lib/python2.7/site-packages/cmislib/model.py", line 260, in post
    **kwargs)
  File "/home/iwright/test/cmis/local/lib/python2.7/site-packages/cmislib/net.py", line 286, in post
    return opener.open(request)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>

Outcomes