apple / ccs-calendarserver

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

_parseConfigFromFile fails to parse the configuration file in Ubuntu. #336

Closed macosforgebot closed 9 years ago

macosforgebot commented 13 years ago

sk@… originally submitted this as ticket:428


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@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@sk:/calendar/CalendarServer$ 
macosforgebot commented 13 years ago

@wsanchez originally submitted this as comment:1:⁠ticket:428

macosforgebot commented 13 years ago

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

macosforgebot commented 11 years ago

@wsanchez originally submitted this as comment:6:⁠ticket:428

macosforgebot commented 11 years ago

@wsanchez originally submitted this as comment:7:⁠ticket:428


We don't have problems with this in OREL Linux. Is it still an issue on Ubuntu?

macosforgebot commented 9 years ago

@wsanchez originally submitted this as comment:11:⁠ticket:428


Expiring old bugs with unknown state and impact.