#14149 closed defect (fixed)

AttributeError: '' object has no attribute 'date'

Reported by: anonymous Owned by: lucid
Priority: normal Component: WeekPlanPlugin
Severity: normal Keywords:
Cc: Trac Release:


2022-08-09 08:45:55,345 Trac[main] ERROR: [] Internal Server Error: <RequestWithSession "GET '/weekplan?start=2022-08-08&end=2022-10-03'">
Traceback (most recent call last):
  File "build\\egg\trac\web\", line 611, in dispatch_request
  File "build\\egg\trac\web\", line 250, in dispatch
    resp = chosen_handler.process_request(req)
  File "build\\egg\weekplan\", line 196, in process_request
    self._send_events(req, events)
  File "build\\egg\weekplan\", line 213, in _send_events
    self._send_json(req, [e.serialized(self.env, context) for e in events])
  File "build\\egg\weekplan\", line 33, in serialized
AttributeError: '' object has no attribute 'date'

Attachments (0)

Change History (3)

comment:1 Changed 22 months ago by anonymous

#14110 ical seems to give sometimes datetime.datetime (OK) but sometimes (unexpected by WeekPlanPlugin).

comment:2 Changed 22 months ago by anonymous

Replacing this line with this seems to help:

-            return WeekPlanEvent(str(entry_id), plan, title, start.dt, end.dt)
+            start = start.dt
+            end = end.dt
+            if isinstance(start,
+                start = datetime.datetime.combine(start, datetime.time(12, 0))
+            if isinstance(end,
+                end = datetime.datetime.combine(end, datetime.time(12, 0))
+            return WeekPlanEvent(str(entry_id), plan, title, start, end)

comment:3 Changed 22 months ago by lucid

Resolution: fixed
Status: newclosed

In 18497:

WeekPlanPlugin: ical recurring events support
(fix #14122)

Fix AttributeError: '' object has no attribute 'date' (fix #14149)

Fix extras_require (see #14110)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain lucid.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.