Ticket #358 (closed Defect: Software changed)
Error running carddav server in Linux
| Reported by: | dave@… | Owned by: | wsanchez@… |
|---|---|---|---|
| Priority: | 5: Not set | Milestone: | CalendarServer-3.1 |
| Component: | Calendar Server | Severity: | Other |
| Keywords: | Cc: | dennis@…, rene@…, alexis@… | |
| Port: |
Description (last modified by wsanchez@…) (diff)
When trying to launch the carddav server on a Debian Etch machine with ./run, I get the error:
ImportError: No module named open directory
I've tried commenting out all opendirectory-related resources in carddavd-dev.plist, but still get the error. I understand that there is no opendirectory on Linux, but there doesn't seem to be a way of keeping the server from trying to load that module.
Full traceback below.
exec python /home/dave/Twisted/bin/twistd -n carddav -f /home/dave/ContactsServer/conf/carddavd-dev.plist -o ProcessType=Combined
Traceback (most recent call last):
File "/home/dave/Twisted/bin/twistd", line 21, in <module>
run()
File "/home/dave/Twisted/twisted/scripts/twistd.py", line 27, in run
app.run(runApp, ServerOptions)
File "/home/dave/Twisted/twisted/application/app.py", line 374, in run
config.parseOptions()
File "/home/dave/Twisted/twisted/application/app.py", line 354, in parseOptions
usage.Options.parseOptions(self, options)
File "/home/dave/Twisted/twisted/python/usage.py", line 184, in parseOptions
for (cmd, short, parser, doc) in self.subCommands:
File "/home/dave/Twisted/twisted/application/app.py", line 365, in subCommands
self.loadedPlugins[plug.tapname] = plug
File "/home/dave/ContactsServer/twisted/plugins/carddav.py", line 13, in getProperty
return getattr(reflect.namedClass(self.serviceMakerClass), propname)
File "/home/dave/Twisted/twisted/python/reflect.py", line 347, in namedObject
module = namedModule(string.join(classSplit[:-1], '.'))
File "/home/dave/Twisted/twisted/python/reflect.py", line 335, in namedModule
topLevel = __import__(name)
File "/home/dave/ContactsServer/addressbookserver/tap/carddav.py", line 84, in <module>
from twistedcaldav.static import AddressBookHomeProvisioningFile, DirectoryBackedAddressBookFile
File "/home/dave/ContactsServer/twistedcaldav/static.py", line 78, in <module>
from twistedcaldav.directory.addressbook import uidsResourceName as uidsResourceNameAddressBook
File "/home/dave/ContactsServer/twistedcaldav/directory/addressbook.py", line 45, in <module>
from twistedcaldav.report_addressbook_findshared import getReadWriteSharedAddressBookGroups, getReadOnlySharedAddressBookGroups, getWritersGroupForSharedAddressBookGroup
File "/home/dave/ContactsServer/twistedcaldav/report_addressbook_findshared.py", line 30, in <module>
import opendirectory
ImportError: No module named open directory
Change History
comment:2 follow-up: ↓ 3 Changed 3 years ago by dennis@…
By enabling the build of PyOpenDirectory on linux, I was enable to get the server up.
comment:3 in reply to: ↑ 2 Changed 3 years ago by guy@…
Replying to dennis@…:
By enabling the build of PyOpenDirectory on linux, I was enable to get the server up.
Please can you provide some simple steps for this?
comment:4 Changed 3 years ago by dennis@…
By editing the run script and comment out the check on darwin where PyOpenDirectory is fetched and build.
This makes the server start, but I haven't been able to connect to it using a Address Book client. But this could be a configuration error on my side.
comment:5 Changed 3 years ago by guy@…
which revision did you have checked out? I'm still not getting this work complete. I've checked out the latest:
http://svn.calendarserver.org/repository/calendarserver/ContactsServer Revision: 5050
comment:6 Changed 3 years ago by dennis@…
I checked out trunk, which seems to be revision 4952. But I had no problem doing it with revision 5050 either.
My changes in run is:
[ContactServer]$ svn diff run
Index: run
===================================================================
--- run (revision 5050)
+++ run (working copy)
@@ -30,7 +30,7 @@
##
set -e
-set -u
+#set -u
wd="$(cd "$(dirname "$0")" && pwd)";
@@ -558,7 +558,7 @@
# PyOpenDirectory
#
-if [ "$(uname -s)" == "Darwin" ]; then
+#if [ "$(uname -s)" == "Darwin" ]; then
# if ! py_have_module opendirectory; then
opendirectory="${top}/PyOpenDirectory";
@@ -568,7 +568,7 @@
export PYTHONPATH="${PYTHONPATH}:${opendirectory}/build/${py_platform_libdir}";
# fi;
-fi;
+#fi;
#
# xattr
comment:7 Changed 3 years ago by dennis@…
Trying again with code block:
[dennis@blackbox3 ContactServer]$ svn diff run
Index: run
===================================================================
--- run (revision 5050)
+++ run (working copy)
@@ -30,7 +30,7 @@
##
set -e
-set -u
+#set -u
wd="$(cd "$(dirname "$0")" && pwd)";
@@ -558,7 +558,7 @@
# PyOpenDirectory
#
-if [ "$(uname -s)" == "Darwin" ]; then
+#if [ "$(uname -s)" == "Darwin" ]; then
# if ! py_have_module opendirectory; then
opendirectory="${top}/PyOpenDirectory";
@@ -568,7 +568,7 @@
export PYTHONPATH="${PYTHONPATH}:${opendirectory}/build/${py_platform_libdir}";
# fi;
-fi;
+#fi;
#
# xattr
comment:8 Changed 3 years ago by guy@…
ok well it seems to compile now... however when it starts the server:
Starting server...
exec python /root/Twisted/bin/twistd -n carddav -f /root/ContactServer2/conf/carddavd-dev.plist -o ProcessType=Combined
Traceback (most recent call last):
File "/root/Twisted/bin/twistd", line 21, in <module>
run()
File "/root/Twisted/twisted/scripts/twistd.py", line 27, in run
app.run(runApp, ServerOptions)
File "/root/Twisted/twisted/application/app.py", line 374, in run
config.parseOptions()
File "/root/Twisted/twisted/application/app.py", line 354, in parseOptions
usage.Options.parseOptions(self, options)
File "/root/Twisted/twisted/python/usage.py", line 184, in parseOptions
for (cmd, short, parser, doc) in self.subCommands:
File "/root/Twisted/twisted/application/app.py", line 365, in subCommands
self.loadedPlugins[plug.tapname] = plug
File "/root/ContactServer2/twisted/plugins/carddav.py", line 13, in getProperty
return getattr(reflect.namedClass(self.serviceMakerClass), propname)
File "/root/Twisted/twisted/python/reflect.py", line 347, in namedObject
module = namedModule(string.join(classSplit[:-1], '.'))
File "/root/Twisted/twisted/python/reflect.py", line 335, in namedModule
topLevel = __import__(name)
File "/root/ContactServer2/addressbookserver/tap/carddav.py", line 71, in <module>
from twistedcaldav.resource import CalDAVResource
File "/root/ContactServer2/twistedcaldav/resource.py", line 42, in <module>
from twisted.web2.dav.idav import IDAVPrincipalCollectionResource
ImportError: cannot import name IDAVPrincipalCollectionResource
comment:10 in reply to: ↑ description Changed 3 years ago by rene@…
I can confirm the error, and also the workaround.
comment:13 Changed 22 months ago by wsanchez@…
- Status changed from new to closed
- Resolution set to Software changed
- Milestone set to CalendarServer-3.1
It should no longer be necessary to try to force build PyOpenDirectory. Try again with trunk.


Cc Me!