Skip to content

Instantly share code, notes, and snippets.

@shoeper
Created December 4, 2014 19:43
Show Gist options
  • Save shoeper/33b1d59bb597ff5e2575 to your computer and use it in GitHub Desktop.
Save shoeper/33b1d59bb597ff5e2575 to your computer and use it in GitHub Desktop.
seafdav error
<type 'exceptions.UnicodeDecodeError'> Python 2.7.3: /usr/bin/python2.7
Thu Dec 4 20:29:55 2014
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
seafile-server-3.1.7/seahub/thirdpart/flup-1.0-py2.6.egg/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>)
556 """Runs the handler, flushes the streams, and ends the request."""
557 try:
=> 558 protocolStatus, appStatus = self.server.handler(self)
559 except:
560 traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object>>
seafile-server-3.1.7/seahub/thirdpart/flup-1.0-py2.6.egg/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>)
1116 result = self.application(environ, start_response)
1117 try:
=> 1118 for data in result:
1119 if data:
1120 write(data)
data undefined, result = <generator object __call__>
seafile-server-3.1.7/seahub/thirdpart/wsgidav/wsgidav_app.py in __call__(self=<wsgidav.wsgidav_app.WsgiDAVApp object>, environ={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, start_response=<function start_response>)
395 # Call next middleware
396 app_iter = self._application(environ, _start_response_wrapper)
=> 397 for v in app_iter:
398 yield v
399 if hasattr(app_iter, "close"):
v undefined, app_iter = <generator object __call__>
seafile-server-3.1.7/seahub/thirdpart/wsgidav/debug_filter.py in __call__(self=<wsgidav.debug_filter.WsgiDavDebugFilter object>, environ={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, start_response=<function _start_response_wrapper>)
152 app_iter = self._application(environ, sub_app_start_response)
153
=> 154 for v in app_iter:
155 # Start response (the first time)
156 if first_yield:
v undefined, app_iter = <generator object __call__>
seafile-server-3.1.7/seahub/thirdpart/wsgidav/error_printer.py in __call__(self=<wsgidav.error_printer.ErrorPrinter object>, environ={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, start_response=<wsgidav.util.SubAppStartResponse object>)
40 # Otherwise the we could not catch exceptions here.
41 response_started = False
=> 42 app_iter = self._application(environ, sub_app_start_response)
43 for v in app_iter:
44 # Start response (the first time)
app_iter undefined, self = <wsgidav.error_printer.ErrorPrinter object>, self._application = <wsgidav.http_authenticator.HTTPAuthenticator object>, environ = {'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, sub_app_start_response = <wsgidav.util.SubAppStartResponse object>
seafile-server-3.1.7/seahub/thirdpart/wsgidav/http_authenticator.py in __call__(self=<wsgidav.http_authenticator.HTTPAuthenticator object>, environ={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, start_response=<wsgidav.util.SubAppStartResponse object>)
193 return self.sendBasicAuthResponse(environ, start_response)
194 elif authmethod == "basic" and self._acceptbasic:
=> 195 return self.authBasicAuthRequest(environ, start_response)
196
197 util.log("HTTPAuthenticator: respond with 400 Bad request; Auth-Method: %s" % authmethod)
self = <wsgidav.http_authenticator.HTTPAuthenticator object>, self.authBasicAuthRequest = <bound method HTTPAuthenticator.authBasicAuthReq...dav.http_authenticator.HTTPAuthenticator object>>, environ = {'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, start_response = <wsgidav.util.SubAppStartResponse object>
seafile-server-3.1.7/seahub/thirdpart/wsgidav/http_authenticator.py in authBasicAuthRequest(self=<wsgidav.http_authenticator.HTTPAuthenticator object>, environ={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, start_response=<wsgidav.util.SubAppStartResponse object>)
236 environ["http_authenticator.realm"] = realmname
237 environ["http_authenticator.username"] = username
=> 238 return self._application(environ, start_response)
239 return self.sendBasicAuthResponse(environ, start_response)
240
self = <wsgidav.http_authenticator.HTTPAuthenticator object>, self._application = <wsgidav.dir_browser.WsgiDavDirBrowser object>, environ = {'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, start_response = <wsgidav.util.SubAppStartResponse object>
seafile-server-3.1.7/seahub/thirdpart/wsgidav/dir_browser.py in __call__(self=<wsgidav.dir_browser.WsgiDavDirBrowser object>, environ={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, start_response=<wsgidav.util.SubAppStartResponse object>)
121 davres = None
122 if environ["wsgidav.provider"]:
=> 123 davres = environ["wsgidav.provider"].getResourceInst(path, environ)
124
125 if environ["REQUEST_METHOD"] in ("GET", "HEAD") and davres and davres.isCollection:
davres = None, environ = {'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...}, ].getResourceInst undefined, path = '/Sueddeutsche/'
seafile-server-3.1.7/seahub/thirdpart/wsgidav/addons/seafile/seafile_dav_provider.py in getResourceInst(self=SeafileProvider for Seafile (Read-Write), path='/Sueddeutsche', environ={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'HTTPS': 'on', 'HTTP_ACCEPT': 'replaced', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'replaced', 'HTTP_AUTHORIZATION': 'Basic replaced', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=replaced; ui-tabs-1=0; csrftoken=replaced', 'HTTP_DNT': '1', ...})
564 path = path.rstrip("/")
565 try:
=> 566 repo, rel_path, obj = resolvePath(path, username)
567 except DAVError, e:
568 if e.value == HTTP_NOT_FOUND:
repo undefined, rel_path undefined, obj undefined, global resolvePath = <function resolvePath>, path = '/Sueddeutsche', username = 'replaced'
seafile-server-3.1.7/seahub/thirdpart/wsgidav/addons/seafile/seafile_dav_provider.py in resolvePath(path='/Sueddeutsche', username='replaced')
580 repo_name = segments.pop(0)
581
=> 582 repo = getRepoByName(repo_name, username)
583
584 rel_path = ""
repo undefined, global getRepoByName = <function getRepoByName>, repo_name = 'Sueddeutsche', username = 'replaced'
seafile-server-3.1.7/seahub/thirdpart/wsgidav/addons/seafile/seafile_dav_provider.py in getRepoByName(repo_name='Sueddeutsche', username='replaced')
635 if not ret_repo:
636 for repo in repos:
=> 637 if repo.name + "-" + repo.id[:6] == repo_name:
638 ret_repo = repo
639 break
repo = <pysearpc.client._SearpcObj object>, repo.name = 'S\xc3\xbcddeutsche', repo.id = u'replaced', repo_name = 'Sueddeutsche'
<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
args = ('ascii', 'S\xc3\xbcddeutsche-', 1, 2, 'ordinal not in range(128)')
encoding = 'ascii'
end = 2
message = ''
object = 'S\xc3\xbcddeutsche-'
reason = 'ordinal not in range(128)'
start = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment