[CalendarServer-users] Unhandled error in XML directory service
Morgen Sagen
sagen at apple.com
Thu Aug 30 07:29:06 PDT 2012
Having the guid value is mandatory because that's the field used to find a corresponding entry in the augments.xml file.
On Aug 28, 2012, at 11:12 AM, Carlos Valiente <superdupont at gmail.com> wrote:
> Hi! I set up a CalendarServer instance (version 4.1.1-dev) with an XML
> directory service configured this way:
>
> caldav.plist snippet:
>
> <key>DirectoryService</key>
> <dict>
> <key>type</key>
> <string>twistedcaldav.directory.xmlfile.XMLDirectoryService</string>
>
> <key>params</key>
> <dict>
> <key>xmlFile</key>
> <string>accounts.xml</string>
> </dict>
> </dict>
>
> accounts.xml:
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE accounts SYSTEM "accounts.dtd">
>
> <accounts realm="virutass.net">
> <user>
> <uid>admin</uid>
> <password>XXXX</password>
> <name>Super User</name>
> </user>
> </accounts>
>
> When CalendarServer starts, I get the following error:
>
> 2012-08-28 20:00:24+0200 [-]
> [twistedcaldav.directory.xmlfile.XMLDirectoryService#info] Directory
> service <XMLDirectoryService 'virutass.net':
> FilePath('/etc/service/calendar/accounts.xml')> has no GUID;
> generating service GUID from realm name.
> 2012-08-28 20:00:24+0200 [-] *** record:
> <XMLDirectoryRecord[users at B5B1BE7C-3638-5621-BE55-1C2E9E8D8FC0(virutass.net)]
> None(admin) 'Super User' @ None/#>
> 2012-08-28 20:00:24+0200 [-] Unhandled error in Deferred:
> 2012-08-28 20:00:24+0200 [-] Unhandled Error
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/calendarserver/tools/util.py",
> line 143, in getDirectory
> directory = BaseDirectoryService(config.DirectoryService.params)
> File "/usr/local/lib/python2.7/dist-packages/twistedcaldav/directory/xmlfile.py",
> line 123, in __init__
> self._accounts()
> File "/usr/local/lib/python2.7/dist-packages/twistedcaldav/directory/xmlfile.py",
> line 180, in _accounts
> record.recordType)
> File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py",
> line 1187, in unwindGenerator
> return _inlineCallbacks(None, gen, Deferred())
> --- <exception caught here> ---
> File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py",
> line 1045, in _inlineCallbacks
> result = g.send(result)
> File "/usr/local/lib/python2.7/dist-packages/twistedcaldav/directory/augment.py",
> line 139, in getAugmentRecord
> "%s-%s*" % (recordType, uid[0:2]),
> exceptions.TypeError: 'NoneType' object has no attribute '__getitem__'
>
> The problem goes away by adding a ``guid`` element under ``<user>``.
>
> Is this the expected behaviour -- that the ``guid`` child of ``user``
> is mandatory? In case it is, is it worth opening a Trac ticket?
>
> C
> _______________________________________________
> calendarserver-users mailing list
> calendarserver-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/calendarserver-users
More information about the calendarserver-users
mailing list