我想将文件从PC发送到另一台安装了owncloud的计算机上
import owncloud
oc = owncloud.Client('http://192.168.xx.xx/')
oc.login('username', 'password')
oc.mkdir('testdir')
oc.put_file('testdir/remotefile.txt', 'deno.txt',remote_user=True)
print('success')
错误如下:
回溯(最近一次通话最后一次):文件“ cloud.py”,第5行,在 oc.login('xxxx','xxxx')文件“ /home/yash/.local/lib/python2.7/site-packages/owncloud/owncloud.py”, 354行,登录 self._update_capabilities()文件“ /home/yash/.local/lib/python2.7/site-packages/owncloud/owncloud.py”, 第1795行,在_update_capabilities中 “功能”文件“ /home/yash/.local/lib/python2.7/site-packages/owncloud/owncloud.py”, 第1649行,在_make_ocs_request中 res = self._session.request(方法,self.url +路径,**属性)文件 “ /home/yash/.local/lib/python2.7/site-packages/requests/sessions.py”, 533行,在请求中 resp = self.send(prep,** send_kwargs)文件“ /home/yash/.local/lib/python2.7/site-packages/requests/sessions.py”, 发送中的第646行 r = adapter.send(request,** kwargs)文件“ /home/yash/.local/lib/python2.7/site-packages/requests/adapters.py”, 发送中的第516行 引发ConnectionError(e,request = request)requests.exceptions.ConnectionError: HTTPConnectionPool(主机='192.168.xx.xx',端口= 80):最多重试 超出网址:/ocs/v1.php/cloud/capabilities(由 NewConnectionError(':无法建立新的连接:[Errno 111] 连接被拒绝',))