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

Issues trying to sync w/ Horde Kronolith #91

Closed
duckunix opened this issue Jul 25, 2014 · 12 comments
Closed

Issues trying to sync w/ Horde Kronolith #91

duckunix opened this issue Jul 25, 2014 · 12 comments

Comments

@duckunix
Copy link

So, the URL is a bit odd:

http://www.example.com/horde/rpc.php/calendars/user/calendar:-gzzlqeBkgYD_SN92wDQ0w4/

I am not sure if the : is what is tripping things up or not.

This is what I get:

Syncing oc_calendar
Syncing asap_calendar
Unhandled exception occured while syncing asap_calendar.
Traceback (most recent call last):
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/cli.py", line 358, in sync_collection
    force_delete=status_name in force_delete
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/sync.py", line 129, in sync
    list_b = prepare_list(storage_b, b_href_to_status)
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/sync.py", line 66, in prepare_list
    for href, etag in storage.list():
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 545, in list
    for href, etag in self._dav_query(xml):
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 423, in _dav_query
    href = self._normalize_href(element.find('{DAV:}href').text)
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 297, in _normalize_href
   assert x.startswith(self.session.url)
AssertionError
@untitaker
Copy link
Member

Can you post the output of vdirsyncer --version? From your traceback it seems like you're using a rather old version.

@duckunix
Copy link
Author

I used

pip2 install --user --upgrade git+git://github.com/untitaker/vdirsyncer.git

to install it today.

don@little:~> vdirsyncer --version
Usage: vdirsyncer [OPTIONS] COMMAND [ARGS]...

Error: no such option: --version

@untitaker
Copy link
Member

--upgrade is not actually going to work with git repos, you'll have to provide --force-reinstall if you try to update an existing version.

But your problem lies somewhere else. I know what the fix is, meanwhile you can remove this line: assert x.startswith(self.session.url)

@duckunix
Copy link
Author

I did the upgrade when I hit an error, and just tried to get HEAD from git.

Anyway, that change makes it work. Thanks!

@untitaker
Copy link
Member

Actually, could you undo that change and try this URL instead:

http://www.example.com/horde/rpc.php/calendars/user/calendar%3A-gzzlqeBkgYD_SN92wDQ0w4/

@duckunix
Copy link
Author

duckunix commented Aug 4, 2014

I just tested with the escaped URL and the assert line put back, and I got:

Unhandled exception occured while syncing asap_calendar.
Traceback (most recent call last):
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/cli.py", line 358, in sync_collection
    force_delete=status_name in force_delete
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/sync.py", line 129, in sync
    list_b = prepare_list(storage_b, b_href_to_status)
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/sync.py", line 66, in prepare_list
    for href, etag in storage.list():
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 545, in list
    for href, etag in self._dav_query(xml):
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 423, in _dav_query
    href = self._normalize_href(element.find('{DAV:}href').text)
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 297, in _normalize_href
    assert x.startswith(self.session.url)
AssertionError

Putting the fix back in place with the escaped URL works.

@untitaker
Copy link
Member

Could you replace the line with

assert x.startswith(self.session.url), (x, self.session.url)

?

@duckunix
Copy link
Author

duckunix commented Aug 4, 2014

different error:

don@little:~/.local/lib/python2.7/site-packages/vdirsyncer/storage> grep url ~/.vdirsyncer/config
#url = http://www.atlantisservices.net:8026/horde/rpc.php/calendars/dharper/calendar:-gzzlqeBkgYD_SN92wDQ0w4/
url = http://www.atlantisservices.net:8026/horde/rpc.php/calendars/dharper/calendar%3A-gzzlqeBkgYD_SN92wDQ0w4/
don@little:~/.local/lib/python2.7/site-packages/vdirsyncer/storage> grep 'assert x.startswith' dav.py
        #assert x.startswith(self.session.url)
        assert x.startswith(self.session.url), (x, self.session.url)
don@little:~/.local/lib/python2.7/site-packages/vdirsyncer/storage> grep url ~/.vdirsyncer/config
#url = http://example.com/horde/rpc.php/calendars/dharper/calendar:-gzzlqeBkgYD_SN92wDQ0w4/
url = http://example.com/horde/rpc.php/calendars/dharper/calendar%3A-gzzlqeBkgYD_SN92wDQ0w4/
don@little:~/.local/lib/python2.7/site-packages/vdirsyncer/storage> vdirsyncer sync
Syncing asap_calendar
Unhandled exception occured while syncing asap_calendar.
Traceback (most recent call last):
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/cli.py", line 358, in sync_collection
    force_delete=status_name in force_delete
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/sync.py", line 129, in sync
    list_b = prepare_list(storage_b, b_href_to_status)
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/sync.py", line 66, in prepare_list
    for href, etag in storage.list():
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 546, in list
    for href, etag in self._dav_query(xml):
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 424, in _dav_query
    href = self._normalize_href(element.find('{DAV:}href').text)
  File "/home/don/.local/lib/python2.7/site-packages/vdirsyncer/storage/dav.py", line 298, in _normalize_href
    assert x.startswith(self.session.url), (x, self.session.url)
AssertionError: ('http://example.com/horde/rpc.php/calendars/dharper/calendar:-gzzlqeBkgYD_SN92wDQ0w4/uUJXW_lAHk1QXDhSI6Rrlw1.ics', 'http://example.com/horde/rpc.php/calendars/dharper/calendar%3A-gzzlqeBkgYD_SN92wDQ0w4/')
don@little:~/.local/lib/python2.7/site-packages/vdirsyncer/storage>

@untitaker
Copy link
Member

Could you now replace this with

assert x.startswith(self.session.url), href

?

I think your server is returning absolute URLs. I realized that the line doesn't really matter, so removing it should work fine. I am still interested in what actually happens though.

@duckunix
Copy link
Author

duckunix commented Aug 4, 2014

Testing with that, and using the unescaped version of the URL (like the first one posted), syncing now works.

More details on the server.

The server runs in a FreeBSD jail, listening on port 80, however, I connect to it via a port redirect on the outside. Could this be causing the issue?

Is there anything I can do to give you data you might need to look at this? Besides access to the server as it is an employer's server....

Thanks....

@untitaker
Copy link
Member

I don't think your network setup has any impact on this. Anyway, just keep the line commented out until i make a new release -- i want to fix a few bugs before.

@untitaker
Copy link
Member

Fixed in version 0.2.2

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