Skip to content

Reading Event with Duration causes exception #18

Open
@meera

Description

I printed the component def create_event(component):

The Event in ical file is

BEGIN:VEVENT
UID:10613
DTSTAMP:20180223T130634Z
SUMMARY:A great event Day
CLASS:PUBLIC
STATUS:CONFIRMED
PRIORITY:0
SEQUENCE:0
DTSTART:20180126
DURATION:P1D
LAST-MODIFIED:20180102T224058Z
TRANSP:OPAQUE
END:VEVENT

Component is
VEVENT({'DTSTART': <icalendar.prop.vDDDTypes object at 0x10b9e3240>, 'SUMMARY': vText('b'A great event Day ''), 'DURATION': <icalendar.prop.vDDDTypes object at 0x10b9ba588>, 'STATUS': vText('b'CONFIRMED''), 'PRIORITY': 0, 'LAST-MODIFIED': <icalendar.prop.vDDDTypes object at 0x10b9bacc0>, 'TRANSP': vText('b'OPAQUE''), 'UID': vText('b'10613''), 'SEQUENCE': 0, 'DTSTAMP': <icalendar.prop.vDDDTypes object at 0x10b9baf98>, 'CLASS': vText('b'PUBLIC'')})
Traceback (most recent call last):
File "/Users/anaconda2/envs_env/bin/flask", line 11, in
sys.exit(main())
File "/Users/anaconda2/envs_env/lib/python3.5/site-packages/flask/cli.py", line 513, in main
cli.main(args=args, prog_name=name)
File "/Users/anaconda2/envs_env/lib/python3.5/site-packages/flask/cli.py", line 380, in main
return AppGroup.main(self, *args, **kwargs)
File "/Users/anaconda2/envs_env/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/anaconda2/envs_env/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/anaconda2/envs_env/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/anaconda2/envs_env/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/anaconda2/envs_env/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/anaconda2/envs_env/lib/python3.5/site-packages/flask/cli.py", line 257, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/Users/anaconda2/envs_env/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/populate_events.py", line 46, in populate_events
all_events = events(url=school.calender_url)
File "/Users/icalevents/icalevents/icalevents.py", line 40, in events
found_events += parse_events(content, start=start, end=end)
File "/Users/icalevents/icalevents/icalparser.py", line 257, in parse_events
e = create_event(component)
File "/Users/icalevents/icalevents/icalparser.py", line 155, in create_event
event_end = normalize(component.get('dtend').dt)
AttributeError: 'NoneType' object has no attribute 'dt'

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions