Running indico user search command line throws error


#1

I’m trying to search users via indico command line ; indico user search -e ‘@’ --substring and throw this errro:

Traceback (most recent call last):
  File "/opt/indico/.venv/bin/indico", line 11, in <module>
    sys.exit(cli())
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/flask/cli.py", line 380, in main
    return AppGroup.main(self, *args, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/cli/util.py", line 119, in invoke
    return self._impl.invoke(ctx)
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/flask/cli.py", line 256, in decorator
    with __ctx.ensure_object(ScriptInfo).load_app().app_context():
  File "/opt/indico/.venv/lib/python2.7/site-packages/flask/cli.py", line 229, in load_app
    rv = self.create_app(self)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/cli/util.py", line 37, in _create_app
    return make_app(set_path=True)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/flask/app.py", line 347, in make_app
    app.config['INDICO'] = load_config(only_defaults=testing, override=config_override)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/core/config.py", line 201, in load_config
    config = _sanitize_data(_parse_config(path))
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/core/config.py", line 154, in _parse_config
    exec compile(config_file.read(), path, 'exec') in globals_, locals_
  File "/opt/indico/.indico.conf", line 69
    SMTP_SERVER = ('127.0.0.1', 25)
              ^
SyntaxError: invalid syntax

#2

You have a syntax error somewhere in your indico.conf file. This file should use valid Python syntax.