[CalendarServer-users] Unhandled error in XML directory service

Carlos Valiente superdupont at gmail.com
Tue Aug 28 11:12:00 PDT 2012

Hi! I set up a CalendarServer instance (version 4.1.1-dev) with an XML
directory service configured this way:

caldav.plist snippet:




    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE accounts SYSTEM "accounts.dtd">

    <accounts realm="virutass.net">
        <name>Super User</name>

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__
          File "/usr/local/lib/python2.7/dist-packages/twistedcaldav/directory/xmlfile.py",
line 180, in _accounts
          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?


More information about the calendarserver-users mailing list