apple / ccs-calendarserver

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

can't find twisted.cred.strcred #261

Closed macosforgebot closed 13 years ago

macosforgebot commented 15 years ago

macosforge@… originally submitted this as ticket:328


Running either './run' or './test twistedcaldav.static', I get:

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

File "/home/arnouten/dev/calendaring/Twisted/twisted/application/app.py", line 354, in parseOptions

usage.Options.parseOptions(self, options)

File "/home/arnouten/dev/calendaring/Twisted/twisted/python/usage.py", line 184, in parseOptions

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

File "/home/arnouten/dev/calendaring/Twisted/twisted/application/app.py", line 364, in subCommands

for plug in plugins:

File "/home/arnouten/dev/calendaring/Twisted/twisted/plugin.py", line 186, in getPlugins

allDropins = getCache(package)

--- <exception caught here> ---

File "/home/arnouten/dev/calendaring/Twisted/twisted/plugin.py", line 151, in getCache

provider = pluginModule.load()

File "/home/arnouten/dev/calendaring/Twisted/twisted/python/modules.py", line 378, in load

return self.pathEntry.pythonPath.moduleLoader(self.name)

File "/home/arnouten/dev/calendaring/Twisted/twisted/python/modules.py", line 614, in moduleLoader

return self._moduleLoader(modname)

File "/home/arnouten/dev/calendaring/Twisted/twisted/python/reflect.py", line 361, in namedAny

topLevelPackage = import(trialname)

File "/usr/share/pyshared/twisted/plugins/cred_anonymous.py", line 14, in <module>

from twisted.cred.strcred import ICheckerFactory

exceptions.ImportError: No module named strcred

Interesting thing is that the lowest entry in the stack is "/usr/share/pyshared/twisted/plugins/cred_anonymous.py", and "/usr/share/pyshared/twisted/cred/strcred.py" actually exists.

macosforgebot commented 15 years ago

macosforge@… originally submitted this as comment:1:⁠ticket:328


This is on ubuntu linux, using latest SVN. These 2 files are from the python-twisted-core package, which 8.1.0.

Removing the python-twisted-core package seems to make the problem go away - "./test twistedcaldav.static" no longer shows stacktraces, though it still reports there are 0 tests.

I'd quite prefer to leave the python-twisted-core package installed, is there any way to tell python only to use CalendarServers `builtin' version?

macosforgebot commented 15 years ago

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


Something about PYTHONPATH is getting /home/arnouten/dev/calendaring/Twisted sometimes and /usr/share/pyshared another time.

It shouldn't be looking in /usr/share/pyshared at all.

On Mac OS X, I have it pretty reliably only using the "builtin" version, so I don't know what's going on here.

macosforgebot commented 13 years ago

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


Should work now that we don't try to build our own Twisted.

macosforgebot commented 13 years ago

@wsanchez originally submitted this as comment:4:⁠ticket:328