jelmer / xandikos

A CalDAV/CardDAV server backed by Git
https://www.xandikos.org/
GNU General Public License v3.0
410 stars 42 forks source link

Failed to create #255

Closed genesistms closed 1 year ago

genesistms commented 1 year ago

I am failing to create or edit events even from khal or SimpleMobileTools calendar app.

Maybe related with #254

Sep 04 04:39:53 tmsvm xandikos[1013]: ERROR:aiohttp.server:Error handling request
Sep 04 04:39:53 tmsvm xandikos[1013]: Traceback (most recent call last):
Sep 04 04:39:53 tmsvm xandikos[1013]:   File "/usr/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
Sep 04 04:39:53 tmsvm xandikos[1013]:     resp = await request_handler(request)
Sep 04 04:39:53 tmsvm xandikos[1013]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 04 04:39:53 tmsvm xandikos[1013]:   File "/usr/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
Sep 04 04:39:53 tmsvm xandikos[1013]:     resp = await handler(request)
Sep 04 04:39:53 tmsvm xandikos[1013]:            ^^^^^^^^^^^^^^^^^^^^^^
Sep 04 04:39:53 tmsvm xandikos[1013]:   File "/usr/lib/python3.11/site-packages/xandikos/web.py", line 1305, in xandikos_handler
Sep 04 04:39:53 tmsvm xandikos[1013]:     return await main_app.aiohttp_handler(request, options.route_prefix)
Sep 04 04:39:53 tmsvm xandikos[1013]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 04 04:39:53 tmsvm xandikos[1013]:   File "/usr/lib/python3.11/site-packages/xandikos/webdav.py", line 2070, in aiohttp_handler
Sep 04 04:39:53 tmsvm xandikos[1013]:     response = await self._handle_request(request, environ)
Sep 04 04:39:53 tmsvm xandikos[1013]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 04 04:39:53 tmsvm xandikos[1013]:   File "/usr/lib/python3.11/site-packages/xandikos/webdav.py", line 2028, in _handle_request
Sep 04 04:39:53 tmsvm xandikos[1013]:     return await do.handle(request, environ, self)
Sep 04 04:39:53 tmsvm xandikos[1013]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 04 04:39:53 tmsvm xandikos[1013]:   File "/usr/lib/python3.11/site-packages/xandikos/webdav.py", line 1670, in handle
Sep 04 04:39:53 tmsvm xandikos[1013]:     (new_name, new_etag) = r.create_member(name, new_contents, content_type)
Sep 04 04:39:53 tmsvm xandikos[1013]:                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 04 04:39:53 tmsvm xandikos[1013]:   File "/usr/lib/python3.11/site-packages/xandikos/web.py", line 359, in create_member
Sep 04 04:39:53 tmsvm xandikos[1013]:     (name, etag) = self.store.import_one(name, content_type, contents)
Sep 04 04:39:53 tmsvm xandikos[1013]:                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 04 04:39:53 tmsvm xandikos[1013]:   File "/usr/lib/python3.11/site-packages/xandikos/store/git.py", line 320, in import_one
Sep 04 04:39:53 tmsvm xandikos[1013]:     etag = self._import_one(name, fi.normalized(), message, author=author)
Sep 04 04:39:53 tmsvm xandikos[1013]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 04 04:39:53 tmsvm xandikos[1013]:   File "/usr/lib/python3.11/site-packages/xandikos/store/git.py", line 693, in _import_one
Sep 04 04:39:53 tmsvm xandikos[1013]:     index[encoded_name] = IndexEntry(
Sep 04 04:39:53 tmsvm xandikos[1013]:                           ^^^^^^^^^^^
Sep 04 04:39:53 tmsvm xandikos[1013]: TypeError: dulwich.index.IndexEntry() argument after * must be an iterable, not IndexEntry
Sep 04 04:39:53 tmsvm xandikos[1013]: INFO:aiohttp.access:127.0.0.1 [04/Sep/2023:08:39:53 +0000] "PUT /tms/calendars/tms/2a7ab8c1-def3-429b-8a01-70f6a655b623.ics HTTP/1.0" 500 226 "-" "DAVx5/4.3.5.1-ose (2023/07/24; dav4jvm; okhttp/4.11.0) Android/9"
jelmer commented 1 year ago

this looks like a regression with dulwich >= 0.21.6; if you pin it to something older this problem should go away

genesistms commented 1 year ago

Thanks.

21.5 worked