Open steview2000 opened 6 years ago
Hi,
this sounds surprising, indeed. I just pushed a commit to switch back to the vobject library, could you test it? (clone git, install using setuptools, ping me if you need help).
Also, could you maybe share a minimal remind input to reproduce the error?
Cheers Jochen
Things are very weird. Here is what I did:
Traceback (most recent call last):
File ${HOME}/.local/bin/rem2dav", line 11, in
This file works when the 2nd line is commented out, but does not work when the 2nd line is included.
I do have another laptop with an almost identical installation, where things work flawless. I checked there and there are multiple versions of vobject (0.9.3 and 0.9.4) and python-caldav installed. So my feeling is that with the correct combination certain versions of the libraries things work. When I have time, I will continue investigating.
Btw, dav2rem.py works without problems.
Thanks for investigating this!
- Install python-caldav (0.4.) and python-vobject (0.9.3-3) from Debian repository
Could you try the current versions from pip instead?
- Now, inside the folder 'remind-caldav' <python setup.py install --user> gave the error that 'python-vobject' where not found.
Fixed, thanks!
- I created a minimal remind file (see below): birthdays.txt
I tested this and had no errors. Can you check if it works if you change the second line a bit, say the date or name?
Alright, first of all I get different error messages depending whether I install remind-caldav with "pip" or via the python setup script. However, with the example file it works in both cases when I change the date, such that the day has two digits. "REM Jan 13 +1 MSG Geburtstag Catherine" works and also "REM Jan 03 +1 MSG Geburtstag Catherine" but "REM Jan 3 +1 MSG Geburtstag Catherine" does not.
Surprisingly no problem occurs when the date in the first line has only a single digit.
Ok, this sounds strange. First of all, what do you use as your caldav server?
Does it work when you only change the part after the MSG?
My guess is that we have a UID conflict somehow. Can you use curl or something to dump all your entries on the caldav and rem2ics to find if the UID is there twice?
My caldav server: https://dav.mailbox.org/caldav
It works when I alter the message somehow, like changing "Catherine" to "Catherin" - quite funny.
I don't know how to use curl to see UID conflict, but I think there is non, since I cleaned the how calendar on the server, so that it has no entries and the problem remains. My feeling is that for some strange reason, certain uid causes problems - maybe a problem in python-caldav?
This sounds definitely like a problem with the UID, with is autogenerated by remind.
Have a look here for some curl commands:
https://stackoverflow.com/a/23093656
You could get the UID of the problematic even using:
echo "REM Jan 3 +1 MSG Geburtstag Catherine" | rem2ics -
Thanks, now I know the uid. But I don't think that the uid collides with an already existing uid on the server, since I also emptied the whole calendar on the server.
My guess is, that for some reasons the generated uid is rejected by the server for other reasons. I deleted all calendars and created new calendars. The result was, that I could sync to one of the calendars without problems, but not to two others, although the settings were the same.
However, from another computer (with the same version of Debian) things work well. The difference is of course that the uid contains the computer name. Also the uid changes when I make slight changes to the entry in the remind file.
This is a bit annoying for me, but so far it is sufficient to sync only from one computer since I use predominatly remind and syncronize the remind file via Dropbox.
Anyhow, since the problem is either with my server or with the remind-python library, this is not an issue with rem2dav and we can stop wasting our time. If I find time I might look into it again and in case I figure something new out I will post it here.
So, thanks again for your support and keep up the good work!
Thanks again for your feedback, I agree that it's probably the server (maybe they cache old UIDs or something). In principal we could catch the PutError and try to work around it by changing the UID or trying to force a deletion (not sure how). But this sounds more like a hack. So let's just keep this open for others to find.
Hello, I use remind-caldav for quite a while now to sync my remind-calendar with a caldav server without any problems.
However, I recently got a new computer and reinstalled remind-caldav using pip. However with the latest version, I always get the following error:
Traceback (most recent call last): File "${HOME}/.local/bin/rem2dav", line 11, in
sys.exit(main())
File "${HOME}/.local/lib/python2.7/site-packages/rem2dav.py", line 112, in main
ncal.add(ldict[uid])
File "${HOME}/.local/lib/python2.7/site-packages/card_me/base.py", line 550, in add
name = objOrName.upper()
File "${HOME}/.local/lib/python2.7/site-packages/vobject/base.py", line 531, in getattr
raise AttributeError(name)
AttributeError: upper
The OS is Debian stretch. I tried various things, such as installing python-vobject and python-caldav from the Debian repositories which has older versions than what comes with pip. However, the error is the same. I'm surprised why vobject is needed, since I thought card_me is a fork of vobject.
Thanks in advance.