strptime() argument 1 must be str, not None
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start in radicale_storage_by_index/init.py at get_all_filtered, especially the request handling around line 196 and the datetime parsing shown in the traceback. Reproduce the calendar-query request with a start but no end, then verify that the request completes without the None strptime error and that bounded ranges still work.
Written by the indexing model from the issue text.
Description
In case a request is done with the following content:
<?xml version="1.0"?>
<C:calendar-query xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<prop>
<getetag />
</prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:time-range start="20180823T112032Z" />
</C:comp-filter>
</C:comp-filter>
</C:filter>
</C:calendar-query>
There is an exception:
Traceback (most recent call last):
File "/srv/radicale/env/lib/python3.5/site-packages/radicale/__init__.py", line 332, in __call__
status, headers, answers = self._handle_request(environ)
File "/srv/radicale/env/lib/python3.5/site-packages/radicale/__init__.py", line 505, in _handle_request
environ, base_prefix, path, user)
File "/srv/radicale/env/lib/python3.5/site-packages/radicale/__init__.py", line 982, in do_REPORT
base_prefix, path, xml_content, collection)
File "/srv/radicale/env/lib/python3.5/site-packages/radicale/xmlutils.py", line 1267, in report
multistatus):
File "/srv/radicale/env/lib/python3.5/site-packages/radicale/xmlutils.py", line 1241, in retrieve_items
yield from collection.get_all_filtered(filters)
File "/srv/radicale/env/src/radicale-storage-by-index/radicale_storage_by_index/__init__.py", line 216, in get_all_filtered
datetime.strptime(request['dtend'], "%Y%m%dT%H%M%SZ"))
TypeError: strptime() argument 1 must be str, not None
This is caused by line 196 which adds dtend to the request always in case there is a time range in the content.
But in the example request there is only a start and no end..
Easy fix is to ONLY add dtend to request if filter_.get("end") is not None
- Dominant language
- Python
- Stars
- 1
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Kozea/RadicaleStorageByIndex
-
Outdated?Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Kozea/RadicaleStorageByIndex#6 · 1 comment ·
All issues in Kozea/RadicaleStorageByIndex
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Techiebutler/freeframe#687 ·
Maintainers usually reply within 1 day
-
bug verbose GC
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
IBM/javacore-analyser#677 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 2 days
-
area/config comp/plugins P1 platform/qqbot tool/file type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NousResearch/hermes-agent#163932 · 1 comment ·
Maintainers usually reply within 1 day
-
plugins/dsh: todayStr() computes UTC but is documented as local — journal entries written 00:00–08:00 local land in the previous day's filePossibly taken @Beehtrix claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#907 · 1 comment ·
Maintainers usually reply within 1 day