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

Errors with Calendar Events having Attendees without an E-Mail Address #57

Open
tuedelue opened this issue Oct 10, 2015 · 0 comments
Open

Comments

@tuedelue
Copy link

Hi together,
for a fancy calendar being displayed on our institute's TV screens, we have decided using an Exchange calendar (easy integration with our other calendars and stuff) & reading needed data with PyExchange for creating some kind of displaying image. I very appreciate this easy-to-use library!

However, as soon an event gets parsed that has an attendee without an email address, a TypeError is raised. Taking a closer look into the sources, you explicitly disallow mail addresses with a None value. Is there a special reason for this?
For us, this particularly does not fit our needs; there is no guarantee having 'valid' entries. I handled this by just setting an empty string in case the attendee_properties do not contain the key 'email' just before parsing the dictionary [init py, before line 504]. This works, but is kind of a quick & dirty hack.

Anyways, I just wanted to let you know about this issue.
Finally, here is the trace:

Traceback (most recent call last):
  File "a.py", line 79, in <module>
    details=True
  File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 95, in list_events
    return Exchange2010CalendarEventList(service=self.service, start=start, end=end, details=details)
  File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 124, in __init__
    self.load_all_details()
  File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 170, in load_all_details
    self._parse_response_for_all_events(response_xml)
  File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 139, in _parse_response_for_all_events
    self._add_event(xml=soap_request.M.Items(deepcopy(item)))
  File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 147, in _add_event
    event = Exchange2010CalendarEvent(service=self.service, xml=xml)
  File "/usr/local/lib/python2.7/dist-packages/pyexchange/base/calendar.py", line 90, in __init__
    self._init_from_xml(xml)
  File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 194, in _init_from_xml
    properties = self._parse_response_for_get_event(xml)
  File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 504, in _parse_response_for_get_event
    result[u'_attendees'] = self._build_resource_dictionary([ExchangeEventResponse(**attendee) for attendee in attendee_properties])
TypeError: __new__() takes exactly 6 arguments (5 given)
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