haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.16k stars 1.54k forks source link

6.0.5 Pro: WebDAV upload error #1818

Closed and-jan closed 7 years ago

and-jan commented 7 years ago

While accessing files over WebDAV works perfectly fine, I am unable to upload files via WebDAV. I also tried various clients. Here are the logs:

[2016-12-19 19:13:55,713]:  e.srcexception:
check_quota() takes exactly 1 argument (2 given)
[2016-12-19 22:17:43,586]:  PUT: byte copy failed
Traceback (most recent call last):
  File "/opt/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/wsgidav/request_server.py", line 671, in doPUT
    contentlength=contentlength)
  File "/opt/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/wsgidav/addons/seafile/seafile_dav_provider.py", line 125, in beginWrite
    if not self.check_repo_owner_quota(isnewfile, contentlength):
  File "/opt/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/wsgidav/addons/seafile/seafile_dav_provider.py", line 111, in check_repo_owner_quota
    return check_repo_quota(self.repo.id, delta) >= 0
TypeError: check_quota() takes exactly 1 argument (2 given)
[2016-12-19 22:17:43,589]:  Traceback (most recent call last):
  File "/opt/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/wsgidav/error_printer.py", line 43, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/wsgidav/request_resolver.py", line 201, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/wsgidav/request_server.py", line 113, in __call__
    app_iter = method(environ, start_response)
  File "/opt/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/wsgidav/request_server.py", line 738, in doPUT
    self._fail(e)
  File "/opt/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/wsgidav/request_server.py", line 128, in _fail
    raise e
DAVError: DAVError(500 Internal Server Error: An internal server error occurred
    Source exception: 'check_quota() takes exactly 1 argument (2 given)')
[2016-12-19 22:17:43,590]:  e.srcexception:
check_quota() takes exactly 1 argument (2 given)
AetherCollective commented 7 years ago

What clients are you using? I ask because I also have issues with WebDAV if I am using Windows 10 File Explorer (aka MiniRedirector 10). Try using CyberDuck and see if you can make changes.

killing commented 7 years ago

@c0d1ng Have you ever installed seafile from source code and installed its python libraries into your python path? It seems the webdav server is using an outdated "seaserv" library from system paths. Please check.

and-jan commented 7 years ago

@BetaLeaf I tried it with nautilus and dolphin, linux file managers. @killing Actually I just installed seafile from the .tar.gz archive, using the standard installation procedure. I just checked for the seaserv python library and found two versions installed: One in the /usr/lib/python2.6/dist-packages directory, the other one in the /usr/lib/python2.7/dist-packages directory. Assuming that the 2.6 version is outdated, i moved it into my home directory, just in case. However, that just changed nothing.

killing commented 7 years ago

You should move both versions under python 2.7 and python 2.6. The server package contains the correct and latest version in itself. So you should remove that python library from you system paths.

and-jan commented 7 years ago

@killing Ahh, yeah that did the trick! I just deleted ´/lib/python2.7/dist-packages/sea*´ aswell and now it's working properly. Thanks!