Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work #28

Open
randomhammer opened this issue Dec 28, 2022 · 1 comment
Open

Does not work #28

randomhammer opened this issue Dec 28, 2022 · 1 comment

Comments

@randomhammer
Copy link

I installed this on a Debian Bullseye machine using the apt package. It runs, but when I try to connect with MacOS Finder I get numerous exceptions such as:

----------------------------------------
2022-12-27 23:59:36,672 INFO PROPFIND: Depth is 0, URI is b'http://tesla.lan:8008/'
----------------------------------------
Exception occurred during processing of request from ('172.16.0.21', 50296)
Traceback (most recent call last):
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 683, in process_request_thread
    self.finish_request(request, client_address)
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/opt/python3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/opt/python3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/WebDAVServer.py", line 344, in do_PROPFIND
    DATA = b'%s\n' % pf.createResponse()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 75, in createResponse
    df = self.create_prop()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 160, in create_prop
    res = self.mk_prop_response(self._uri, gp, bp, doc)
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 245, in mk_prop_response
    uri = self._dataclass.baseurl + '/' + '/'.join(uri.split('/')[3:])
TypeError: a bytes-like object is required, not 'str'
----------------------------------------
2022-12-27 23:59:36,675 INFO PROPFIND: Depth is 0, URI is b'http://tesla.lan:8008/'
----------------------------------------
Exception occurred during processing of request from ('172.16.0.21', 50297)
Traceback (most recent call last):
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 683, in process_request_thread
    self.finish_request(request, client_address)
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/opt/python3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/opt/python3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/WebDAVServer.py", line 344, in do_PROPFIND
    DATA = b'%s\n' % pf.createResponse()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 75, in createResponse
    df = self.create_prop()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 160, in create_prop
    res = self.mk_prop_response(self._uri, gp, bp, doc)
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 245, in mk_prop_response
    uri = self._dataclass.baseurl + '/' + '/'.join(uri.split('/')[3:])
TypeError: a bytes-like object is required, not 'str'

Over and over. Looks like unicode is broken?

@andrewleech
Copy link
Owner

This might be fixed by some recently merged contributions included in https://pypi.org/project/PyWebDAV3/0.10.0/

Would you mind re-testing please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants