Skip to content
This repository has been archived by the owner. It is now read-only.

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

Closed
macosforgebot opened this issue Apr 5, 2011 · 5 comments
Closed

Comments

@macosforgebot
Copy link

@macosforgebot macosforgebot commented Apr 5, 2011

sk@… originally submitted this as ticket:428

  • Keywords: parser, fail, configuration, ubuntu, parseConfigFromFile, caldavd-dev.plist
  • Cc: sk@…

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
Copy link
Author

@macosforgebot macosforgebot commented Apr 5, 2011

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

  • Description modified
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 1, 2011

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

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jan 24, 2013

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

  • Milestone changed from Linux Port to Later
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jan 24, 2013

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

  • Priority changed from 1: Blocker to 3: Important

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

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Mar 26, 2015

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

  • Status changed from new to closed
  • Resolution set to Not to be fixed

Expiring old bugs with unknown state and impact.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.