Ticket #328 (closed Defect: Software changed)
can't find twisted.cred.strcred
| Reported by: | macosforge@… | Owned by: | wsanchez@… |
|---|---|---|---|
| Priority: | 2: Expected | Milestone: | CalendarServer-3.0 |
| Component: | Calendar Server | Severity: | Other |
| Keywords: | Cc: | kurt.leubner@… | |
| Port: |
Description
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.
Change History
comment:2 Changed 4 years ago by wsanchez@…
- Priority changed from 5: Not set to 2: Expected
- Milestone set to Linux Port
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.
comment:3 Changed 22 months ago by wsanchez@…
- Status changed from new to closed
- Resolution set to Software changed
Should work now that we don't try to build our own Twisted.


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?