0

I'd like to create a VERY simple access to a Baikal CalDav/CardDav server to read address book and calenders entries. No update required, read-only! The whole thing must run with Python 2.6 (Win32) - not 2.7 or 3.x.

I found these packages:

CalDav: https://pypi.python.org/pypi/caldav/0.4.0

CardDav: https://github.com/ljanyst/carddav-util

Well they have some dependencies which I installed and they both use lxml. So I installed this:

https://pypi.python.org/pypi/lxml/3.6.0

But now running a simple program using both libs (carddav, caldav) I encounter the following error:

  File "C:\Python26\lib\site-packages\carddav.py", line 46, in <module>
    import lxml.etree as ET
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.

So it seems that although the lib lxml is the latest release it does not work with carddav.py!

I tried older versions of lxml - e.g. 2.2.4 - and then it seems to work?!

What has changed and how do I work around this issue? I would really like to use lxml 3.60!

Note that Python26 and all libs are Win32.

Thank you!

Oli K
  • 39
  • 7
  • If 2.2.4 works, just use it? _Why_ do you want to use 3.6? Otherwise, as a senior developer, you should be able to adjust the respective modules for 3.6? Precisely what part is blocking you? – hnh May 23 '16 at 22:21
  • Although I have a lot of experience with other programming languages I am new to Python which does many things differently than other programming languages. And I am so honest to say that I still have to learn theses differences! Another dependency prevents changing it the way it would be required without leading to new problems. Also personally I think it's no good idea to manually patch 3rd party code because if it gets updated you can repatch again etc. In this case I solved the issue by using other packages and coding some stuff from scratch again! – Oli K May 25 '16 at 11:51
  • Why 3.6? Because bugs (I might not be even aware of) might have been fixed in the updated lib which are still present in 2.2.4. Also code optimization might have been done. Using old stuff when new code is available most of the time is no good idea when it is avoidable! Why don't people still use Windows 2000? Sort of the same question... – Oli K May 25 '16 at 11:56
  • ? This is all nice but lets focus on your question. You have a working solution with lxml 2.x. You still absolutely want to use lxml 3.x (you should update your question to reflect that focus!) Given the bump in the major version number, it'll contain major changes, including API changes. So the way to go is to port carddav.py to the lxml3 API. And of course you should submit such changes upstream! Wrt "What has changed" http://lxml.de/3.6/changes-3.6.0.html. – hnh May 25 '16 at 12:27
  • Given that your access requirements are simple, you might also consider just doing the two or three requests manually, w/o the modules. Readonly DAV is not hard, this is a great tutorial: http://sabre.io/dav/building-a-carddav-client/ – hnh May 25 '16 at 12:30

0 Answers0