apple / ccs-calendarserver

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

CalendarServer doesn't start anymore #461

Closed macosforgebot closed 10 years ago

macosforgebot commented 10 years ago

weismw@… originally submitted this as ticket:820


I am using Debian testing (Jessie). Python 2.7.5+. When starting the calendarserver with /etc/init.d/calendarserver start I get the following error message:

Traceback (most recent call last):
  File "/usr/bin/twistd", line 14, in <module>
    run()
  File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 27, in run
    app.run(runApp, ServerOptions)
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 647, in run
    config.parseOptions()
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 614, in parseOptions
    usage.Options.parseOptions(self, options)
  File "/usr/lib/python2.7/dist-packages/twisted/python/usage.py", line 261, in parseOptions
    for (cmd, short, parser, doc) in self.subCommands:
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 631, in subCommands
    for plug in sorted(plugins, key=attrgetter('tapname')):
  File "/usr/lib/python2.7/dist-packages/twisted/plugins/caldav.py", line 29, in getProperty
    return getattr(reflect.namedClass(self.serviceMakerClass), propname)
  File "/usr/lib/python2.7/dist-packages/twisted/python/_reflectpy3.py", line 151, in namedObject
    module = namedModule('.'.join(classSplit[:-1]))
  File "/usr/lib/python2.7/dist-packages/twisted/python/_reflectpy3.py", line 137, in namedModule
    topLevel = __import__(name)
  File "/usr/lib/python2.7/dist-packages/twistedcaldav/mail.py", line 78, in <module>
    from calendarserver.tap.util import getRootResource, directoryFromConfig
  File "/usr/lib/python2.7/dist-packages/calendarserver/tap/util.py", line 89, in <module>
    from txdav.common.datastore.sql import CommonDataStore as CommonSQLDataStore
  File "/usr/lib/python2.7/dist-packages/txdav/common/datastore/sql.py", line 47, in <module>
    from txdav.common.datastore.sql_legacy import PostgresLegacyNotificationsEmulator
  File "/usr/lib/python2.7/dist-packages/txdav/common/datastore/sql_legacy.py", line 51, in <module>
    from txdav.common.datastore.sql_tables import (
  File "/usr/lib/python2.7/dist-packages/txdav/common/datastore/sql_tables.py", line 44, in <module>
    schema = _populateSchema()
  File "/usr/lib/python2.7/dist-packages/txdav/common/datastore/sql_tables.py", line 40, in _populateSchema
    return SchemaSyntax(schemaFromPath(pathObj))
  File "/usr/lib/python2.7/dist-packages/twext/enterprise/dal/parseschema.py", line 86, in schemaFromPath
    addSQLToSchema(schema, schemaData)
  File "/usr/lib/python2.7/dist-packages/twext/enterprise/dal/parseschema.py", line 115, in addSQLToSchema
    t = tableFromCreateStatement(schema, stmt)
  File "/usr/lib/python2.7/dist-packages/twext/enterprise/dal/parseschema.py", line 70, in tableFromCreateStatement
    cp.parse()
  File "/usr/lib/python2.7/dist-packages/twext/enterprise/dal/parseschema.py", line 222, in parse
    while self.nextColumn():
  File "/usr/lib/python2.7/dist-packages/twext/enterprise/dal/parseschema.py", line 234, in nextColumn
    return self.parseColumn(maybeIdent.get_name())
  File "/usr/lib/python2.7/dist-packages/twext/enterprise/dal/parseschema.py", line 344, in parseColumn
    expect(pareniter, ttype=String.Single).value)
  File "/usr/lib/python2.7/dist-packages/twext/enterprise/dal/parseschema.py", line 454, in expect
    return expectSingle(nextval, **kw)
  File "/usr/lib/python2.7/dist-packages/twext/enterprise/dal/parseschema.py", line 435, in expectSingle
    raise ViolatedExpectation(ttype, '%s:%r' % (nextval.ttype, nextval))
twext.enterprise.dal.parseschema.ViolatedExpectation: Expected Token.Literal.String.Single got None:<Identifier ''RESOU...' at 0x27128d0>

Can you please help me fix this error. Please let me know if you need any additional information.

Thanks, Michael

macosforgebot commented 10 years ago

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

macosforgebot commented 10 years ago

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

macosforgebot commented 10 years ago

@wsanchez originally submitted this as comment:3:⁠ticket:820

macosforgebot commented 10 years ago

@glyph originally submitted this as comment:4:⁠ticket:820


Hmm. Looks like you might not be using the right version of SQLParse.

macosforgebot commented 10 years ago

weismw@… originally submitted this as comment:5:⁠ticket:820


You are right the combination calendarserver 3.2+dfsg-5 and python-sqlparse 0.1.8-1 doesn't work. The issue seems to be with the python-sqlparse. Downgrading this package to the stable version python-sqlparse 0.1.4-1 fixed the problem.

Thanks for your help.

macosforgebot commented 10 years ago

@glyph originally submitted this as comment:6:⁠ticket:820


SQLParse doesn't expose any kind of stable, public API; the internals of its parse tree change dramatically from version to version. So it's always important to get exactly the right version for your version of Calendar Server. (The build script has a list of dependencies and the expected version.)