owncloud list外部存储(错误503)

时间:2016-08-27 19:01:37

标签: python python-2.7 owncloud cloud-storage

尝试使用pyocclient我自己的云服务器列出外部存储的文件时,会返回503 http状态代码,并显示以下错误:

<?xml version="1.0" encoding="UTF-8"?>

-<d:error xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:">

<s:exception>Sabre\DAV\Exception\ServiceUnavailable</s:exception>

<s:message>Storage not available</s:message>

</d:error>

这是我使用的代码,它在普通文件夹上完美运行:

url = 'https://drive.xxxxxx.xx/'
webdavRoot = 'remote.php/webdav'
oc = owncloud.Client(url, verify_certs=False)

oc.login('xxxx', 'xxxx')

listFiles = oc.list('/HomeDrive (H)/')

使用以下代码时,它确实有效:

for item in listFiles:
    list.append(item.get_path())
print list
test = oc.list(list[3])
print test
经过一些更多的测试后,似乎我首先要在根文件夹工作之前对其进行列表请求。但这样做是一个额外的请求,它真的会减慢我的代码。有办法解决这个问题吗?

verify_certs为False,因为我使用Fiddler来检查请求。

0 个答案:

没有答案