[CalendarServer-dev] [Calendar and Contacts Server] #428: _parseConfigFromFile fails to parse the configuration file in Ubuntu.

Calendar and Contacts Server trac at macosforge.org
Tue Apr 5 09:35:17 PDT 2011


#428: _parseConfigFromFile fails to parse the configuration file in Ubuntu.
------------------------------------------------------------------------------------+
 Reporter:  sk@…                                                                    |       Owner:  wsanchez@…        
     Type:  Defect                                                                  |      Status:  new               
 Priority:  1: Blocker                                                              |   Milestone:  Linux Port        
Component:  Calendar Server                                                         |    Severity:  Serious           
 Keywords:  parser fail configuration ubuntu parseConfigFromFile caldavd-dev.plist  |       Radar:                    
------------------------------------------------------------------------------------+
Description changed by wsanchez@…:

Old description:

> The parser.parse() functions returns None from the following piece of
> code in CalendarServer/twistedcaldav/stdconfig.py
>
>     def _parseConfigFromFile(self, filename):
>         parser = NoUnicodePlistParser()
>         configDict = None
>         try:
>             configDict = parser.parse(open(filename))
>         except (IOError, OSError):
>             log.err("Configuration file does not exist or is
> inaccessible: %s" % (filename, ))
>             raise ConfigurationError("Configuration file does not exist
> or is inaccessible: %s" % (filename, ))
>         else:
>             configDict = _cleanup(configDict, self._defaults)
>         return configDict
>
> sangeetk at sk:/calendar/CalendarServer$ ./run -v
>
> Using system version of Zope Interface.
>
> Using system version of PyXML.
>
> Using system version of PyOpenSSL.
>
> Using system version of PyKerberos.
>
> A system version of xattr exists, but version is 0.4 (< 0.5).
> Current working copy (/calendar/xattr) is from the wrong URI: http://svn
> .red-bean.com/bob/xattr/releases/xattr-0.6.1 != http://svn.red-
> bean.com/bob/xattr/releases/xattr-0.6.1/
> Performing repository switch for xattr...
> At revision 1038.
>
> Removing build directory /calendar/xattr/build...
> Removing pyc files from /calendar/xattr...
> Building xattr...
>
> Using system version of PyGreSQL.
>
> A system version of twisted exists, but version is 10.0.0 (< 10.1).
> Building Twisted...
>
> Using system version of dateutil.
>
> Building python-ldap...
> extra_compile_args:
> extra_objects:
> include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
> library_dirs: /usr/local/openldap-2.3/lib
> libs: ldap_r lber sasl2 ssl crypto
> file Lib/ldap.py (for module ldap) not found
> file Lib/ldap/schema.py (for module ldap.schema) not found
> file Lib/ldap.py (for module ldap) not found
> file Lib/ldap/schema.py (for module ldap.schema) not found
>

>
> Building SQLParse...
>
> Using system version of Pyflakes.
> Updating CalDAVTester...
> At revision 7290.
>
> Removing build directory /calendar/CalDAVTester/build...
> Removing pyc files from /calendar/CalDAVTester...
> Updating CalDAVClientLibrary...
> At revision 7290.
>
> Removing build directory /calendar/CalDAVClientLibrary/build...
> Removing pyc files from /calendar/CalDAVClientLibrary...
>
> Building pydoctor...
> Building our own extension modules...
> running build_ext
>
> Using python as Python
>
> Starting server...
> /calendar/Twisted/build/lib.linux-x86_64-2.6/twisted/mail/smtp.py:10:
> DeprecationWarning: the MimeWriter module is deprecated; use the email
> package instead
>   import MimeWriter, tempfile, rfc822
> Reading configuration from file: /calendar/CalendarServer/conf/caldavd-
> dev.plist
> Traceback (most recent call last):
>   File "/calendar/Twisted/build/scripts-2.6/twistd", line 19, in <module>
>     run()
>   File "/calendar/Twisted/build/lib.linux-
> x86_64-2.6/twisted/scripts/twistd.py", line 27, in run
>     app.run(runApp, ServerOptions)
>   File "/calendar/Twisted/build/lib.linux-
> x86_64-2.6/twisted/application/app.py", line 621, in run
>     config.parseOptions()
>   File "/calendar/Twisted/build/lib.linux-
> x86_64-2.6/twisted/application/app.py", line 601, in parseOptions
>     usage.Options.parseOptions(self, options)
>   File "/calendar/Twisted/build/lib.linux-
> x86_64-2.6/twisted/python/usage.py", line 231, in parseOptions
>     self.subOptions.parseOptions(rest)
>   File "/calendar/Twisted/build/lib.linux-
> x86_64-2.6/twisted/python/usage.py", line 241, in parseOptions
>     self.postOptions()
>   File "/calendar/CalendarServer/calendarserver/tap/caldav.py", line 266,
> in postOptions
>     self.loadConfiguration()
>   File "/calendar/CalendarServer/calendarserver/tap/caldav.py", line 277,
> in loadConfiguration
>     config.load(self["config"])
>   File "/calendar/CalendarServer/twistedcaldav/config.py", line 223, in
> load
>     configDict = ConfigDict(self._provider.loadConfig())
>   File "/calendar/CalendarServer/twistedcaldav/stdconfig.py", line 756,
> in loadConfig
>     configDict = self._parseConfigFromFile(self._configFileName)
>   File "/calendar/CalendarServer/twistedcaldav/stdconfig.py", line 781,
> in _parseConfigFromFile
>     configDict = _cleanup(configDict, self._defaults)
>   File "/calendar/CalendarServer/twistedcaldav/stdconfig.py", line 1208,
> in _cleanup
>     for key in configDict:
> TypeError: ''''NoneType'''' object is not iterable
>
> sangeetk at sk:/calendar/CalendarServer$

New description:

 The parser.parse() functions returns None from the following piece of code
 in CalendarServer/twistedcaldav/stdconfig.py

 {{{
     def _parseConfigFromFile(self, filename):
         parser = NoUnicodePlistParser()
         configDict = None
         try:
             configDict = parser.parse(open(filename))
         except (IOError, OSError):
             log.err("Configuration file does not exist or is inaccessible:
 %s" % (filename, ))
             raise ConfigurationError("Configuration file does not exist or
 is inaccessible: %s" % (filename, ))
         else:
             configDict = _cleanup(configDict, self._defaults)
         return configDict
 }}}

 {{{
 sangeetk at sk:/calendar/CalendarServer$ ./run -v

 Using system version of Zope Interface.

 Using system version of PyXML.

 Using system version of PyOpenSSL.

 Using system version of PyKerberos.

 A system version of xattr exists, but version is 0.4 (< 0.5).
 Current working copy (/calendar/xattr) is from the wrong URI: http://svn
 .red-bean.com/bob/xattr/releases/xattr-0.6.1 != http://svn.red-
 bean.com/bob/xattr/releases/xattr-0.6.1/
 Performing repository switch for xattr...
 At revision 1038.

 Removing build directory /calendar/xattr/build...
 Removing pyc files from /calendar/xattr...
 Building xattr...

 Using system version of PyGreSQL.

 A system version of twisted exists, but version is 10.0.0 (< 10.1).
 Building Twisted...

 Using system version of dateutil.

 Building python-ldap...
 extra_compile_args:
 extra_objects:
 include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
 library_dirs: /usr/local/openldap-2.3/lib
 libs: ldap_r lber sasl2 ssl crypto
 file Lib/ldap.py (for module ldap) not found
 file Lib/ldap/schema.py (for module ldap.schema) not found
 file Lib/ldap.py (for module ldap) not found
 file Lib/ldap/schema.py (for module ldap.schema) not found



 Building SQLParse...

 Using system version of Pyflakes.
 Updating CalDAVTester...
 At revision 7290.

 Removing build directory /calendar/CalDAVTester/build...
 Removing pyc files from /calendar/CalDAVTester...
 Updating CalDAVClientLibrary...
 At revision 7290.

 Removing build directory /calendar/CalDAVClientLibrary/build...
 Removing pyc files from /calendar/CalDAVClientLibrary...

 Building pydoctor...
 Building our own extension modules...
 running build_ext

 Using python as Python

 Starting server...
 /calendar/Twisted/build/lib.linux-x86_64-2.6/twisted/mail/smtp.py:10:
 DeprecationWarning: the MimeWriter module is deprecated; use the email
 package instead
   import MimeWriter, tempfile, rfc822
 Reading configuration from file: /calendar/CalendarServer/conf/caldavd-
 dev.plist
 Traceback (most recent call last):
   File "/calendar/Twisted/build/scripts-2.6/twistd", line 19, in <module>
     run()
   File "/calendar/Twisted/build/lib.linux-
 x86_64-2.6/twisted/scripts/twistd.py", line 27, in run
     app.run(runApp, ServerOptions)
   File "/calendar/Twisted/build/lib.linux-
 x86_64-2.6/twisted/application/app.py", line 621, in run
     config.parseOptions()
   File "/calendar/Twisted/build/lib.linux-
 x86_64-2.6/twisted/application/app.py", line 601, in parseOptions
     usage.Options.parseOptions(self, options)
   File "/calendar/Twisted/build/lib.linux-
 x86_64-2.6/twisted/python/usage.py", line 231, in parseOptions
     self.subOptions.parseOptions(rest)
   File "/calendar/Twisted/build/lib.linux-
 x86_64-2.6/twisted/python/usage.py", line 241, in parseOptions
     self.postOptions()
   File "/calendar/CalendarServer/calendarserver/tap/caldav.py", line 266,
 in postOptions
     self.loadConfiguration()
   File "/calendar/CalendarServer/calendarserver/tap/caldav.py", line 277,
 in loadConfiguration
     config.load(self["config"])
   File "/calendar/CalendarServer/twistedcaldav/config.py", line 223, in
 load
     configDict = ConfigDict(self._provider.loadConfig())
   File "/calendar/CalendarServer/twistedcaldav/stdconfig.py", line 756, in
 loadConfig
     configDict = self._parseConfigFromFile(self._configFileName)
   File "/calendar/CalendarServer/twistedcaldav/stdconfig.py", line 781, in
 _parseConfigFromFile
     configDict = _cleanup(configDict, self._defaults)
   File "/calendar/CalendarServer/twistedcaldav/stdconfig.py", line 1208,
 in _cleanup
     for key in configDict:
 TypeError: ''''NoneType'''' object is not iterable

 sangeetk at sk:/calendar/CalendarServer$
 }}}

--

-- 
Ticket URL: <http://trac.calendarserver.org/ticket/428#comment:1>
Calendar and Contacts Server </>
HTTP/WebDAV/CalDAV Server


More information about the calendarserver-dev mailing list