apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
486 stars 136 forks source link

Error running carddav server in Linux #286

Closed macosforgebot closed 14 years ago

macosforgebot commented 14 years ago

dave@… originally submitted this as ticket:359


When trying to launch the carddav server on a Debian Etch machine with ./run, I get the error:

ImportError: No module named opendirectory

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 opendirectory

macosforgebot commented 14 years ago

dennis@… originally submitted this as comment:1:⁠ticket:359

macosforgebot commented 14 years ago

@wsanchez originally submitted this as comment:2:⁠ticket:359


CardDAV functionality has now been merged into the CalendarServer project. Do you see this problem there?

macosforgebot commented 14 years ago

@wsanchez originally submitted this as comment:3:⁠ticket:359

macosforgebot commented 14 years ago

guy@… originally submitted this as comment:4:⁠ticket:359


the install works just fine... however when you attempt to start it up with the carddav-dev.plist we get:

Starting server... exec python /root/Twisted/bin/twistd -n caldav -f /root/calCardDAV/conf/caldavd-dev.plist -o ProcessType=Combined Traceback (most recent call last):

File "/root/Twisted/bin/twistd", line 19, 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 688, in run

config.parseOptions()

File "/root/Twisted/twisted/application/app.py", line 668, in parseOptions

usage.Options.parseOptions(self, options)

File "/root/Twisted/twisted/python/usage.py", line 226, in parseOptions

for (cmd, short, parser, doc) in self.subCommands:

File "/root/Twisted/twisted/application/app.py", line 679, in subCommands

self.loadedPlugins[plug.tapname] = plug

File "/root/calCardDAV/twisted/plugins/caldav.py", line 29, in getProperty

return getattr(reflect.namedClass(self.serviceMakerClass), propname)

File "/root/Twisted/twisted/python/reflect.py", line 349, in namedObject

module = namedModule('.'.join(classSplit[:-1]))

File "/root/Twisted/twisted/python/reflect.py", line 337, in namedModule

topLevel = import(name)

File "/root/calCardDAV/calendarserver/sidecar/task.py", line 45, in <module>

from calendarserver.util import getRootResource

File "/root/calCardDAV/calendarserver/util.py", line 48, in <module>

from twistedcaldav.static import CalendarHomeProvisioningFile

File "/root/calCardDAV/twistedcaldav/static.py", line 83, in <module>

from twistedcaldav.directory.addressbook import uidsResourceName as uidsResourceNameAddressBook

File "/root/calCardDAV/twistedcaldav/directory/addressbook.py", line 45, in <module>

from twistedcaldav.report_addressbook_findshared import getReadWriteSharedAddressBookGroups, getReadOnlySharedAddressBookGroups, getWritersGroupForSharedAddressBookGroup

File "/root/calCardDAV/twistedcaldav/report_addressbook_findshared.py", line 29, in <module>

from plistlib import readPlist

ImportError: No module named plistlib

macosforgebot commented 14 years ago

@wsanchez originally submitted this as comment:5:⁠ticket:359


OK, that's a new bug. Filed #⁠363 for you.