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

DavMail help!?! #145

Closed
whodevil opened this issue Dec 5, 2014 · 7 comments
Closed

DavMail help!?! #145

whodevil opened this issue Dec 5, 2014 · 7 comments

Comments

@whodevil
Copy link

whodevil commented Dec 5, 2014

I'm trying to get vdirsyncer to work with davmail. I feel like a total idiot because I can't seem to get the right url set to get my personal calendar. I have the CalDav interface to davmail running on 1443. I've set the remote storage URL to a number of different things and nothing seems to work. The closest I've got is with the url http://localhost:1443/principals/public but this results in the following traceback. I'm using python 2.7 and vdirsyncer 0.3.2

vdirsyncer --verbosity=DEBUG sync
debug: Using 0 maximal workers.
Syncing calendar/whodevil@mywork.com
debug: Loaded status for calendar/whodevil@mywork.com
debug: OPTIONS http://localhost:1443/principals/public/whodevil@mywork.com/
debug: {'Depth': 1, 'Content-Type': 'application/xml; charset=UTF-8', 'User-Agent': 'vdirsyncer'}
debug: None
debug: Sending request...
debug: 200
debug: {'content-length': '0', 'expires': 'Fri, 05 Dec 2014 01:16:37 +0000', 'connection': 'keep-alive', 'server': 'DavMail Gateway 4.5.1-2303', 'dav': '1, calendar-access, calenda
r-schedule, calendarserver-private-events, addressbook', 'allow': 'OPTIONS, PROPFIND, HEAD, GET, REPORT, PROPPATCH, PUT, DELETE, POST', 'cache-control': 'private, max-age=0', 'date
': 'Fri, 05 Dec 2014 01:16:37 +0000'}

debug: REPORT http://localhost:1443/principals/public/whodevil@mywork.com/
debug: {'Depth': 'infinity', 'Content-Type': 'application/xml; charset=UTF-8', 'User-Agent': 'vdirsyncer'}
debug: <?xml version="1.0" encoding="utf-8" ?>
debug:             <C:calendar-query xmlns:D="DAV:"
debug:                 xmlns:C="urn:ietf:params:xml:ns:caldav">
debug:                 <D:prop>
debug:                     <D:getcontenttype/>
debug:                     <D:getetag/>
debug:                 </D:prop>
debug:                 <C:filter>
debug:
debug:                 <C:comp-filter name="VCALENDAR">
debug:                     <C:comp-filter name="VTODO">
debug:
debug:                     </C:comp-filter>
debug:                 </C:comp-filter>
debug:
debug:                 </C:filter>
debug:             </C:calendar-query>
debug: Sending request...
debug: 207
debug: {'transfer-encoding': 'chunked', 'expires': 'Fri, 05 Dec 2014 01:16:37 +0000', 'connection': 'keep-alive', 'server': 'DavMail Gateway 4.5.1-2303', 'dav': '1, calendar-access
, calendar-schedule, calendarserver-private-events, addressbook', 'cache-control': 'private, max-age=0', 'date': 'Fri, 05 Dec 2014 01:16:37 +0000', 'content-type': 'text/xml;charse
t=UTF-8'}
debug: <?xml version="1.0" encoding="UTF-8"?><D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:E="urn:ietf:params:xml:ns:carddav"><D:response><D:href>/pri
ncipals/public/whodevil@mywork.com</D:href><D:propstat><D:prop></D:prop><D:status>HTTP/1.1 200 OK</D:status></D:propstat></D:response></D:multistatus>
Unhandled exception occured while syncing calendar/whodevil@mywork.com.
Traceback (most recent call last):
  File "/Users/whodevil/python/khal/lib/python2.7/site-packages/vdirsyncer/cli.py", line 480, in sync_collection
    force_delete=status_name in force_delete
  File "/Users/whodevil/python/khal/lib/python2.7/site-packages/vdirsyncer/sync.py", line 129, in sync
    b_idents = _prepare_idents(storage_b, storage_a, b_href_to_status)
  File "/Users/whodevil/python/khal/lib/python2.7/site-packages/vdirsyncer/sync.py", line 66, in _prepare_idents
    for href, etag in storage.list():
  File "/Users/whodevil/python/khal/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 565, in list
    for href, etag in self._dav_query(xml):
  File "/Users/whodevil/python/khal/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 420, in _dav_query
    contenttype = prop.find('{DAV:}getcontenttype').text
AttributeError: 'NoneType' object has no attribute 'text'

Any hints would be greatly appreciated!

@untitaker
Copy link
Member

See http://davmail.sourceforge.net/thunderbirdcalendarsetup.html for which URLs to use. But then you might run into #144, I'd apprechiate feedback on the fix I posted there.

@whodevil
Copy link
Author

whodevil commented Dec 5, 2014

@untitaker Thanks, I'll try that.

@whodevil
Copy link
Author

whodevil commented Dec 5, 2014

Ok I was able to get vdirsyncer working!!!! Awesome. I'm not running into the above bug.

@untitaker Thanks! I knew I was missing something really simple.

@whodevil whodevil closed this as completed Dec 5, 2014
@untitaker
Copy link
Member

So it does work with the fix from #144? Does it even fail without it?

@whodevil
Copy link
Author

whodevil commented Dec 5, 2014

I didn't need to use the fix in #144, it just worked.

@untitaker
Copy link
Member

Does vdirsyncer yield any warnings during synchronization?

You might want to consider doing this test to see whether the issue exists, because it can have silent effects (basically data-loss):

Create two files, doesn't matter how named (but not overwriting existing ones) in one of your calendars: https://gist.github.com/untitaker/5748f2a504ff14f5c2bb

Then try to sync twice. If one of the files is missing, vdirsyncer crashes or yields warnings, you have the bug.

@whodevil
Copy link
Author

whodevil commented Dec 5, 2014

Hmm, maybe I'm not running into this issue because i have it set to read only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants