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

Reading Event with Duration causes exception #18

Open
meera opened this issue Apr 26, 2018 · 0 comments
Open

Reading Event with Duration causes exception #18

meera opened this issue Apr 26, 2018 · 0 comments

Comments

@meera
Copy link

meera commented Apr 26, 2018

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'

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

1 participant