Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Не удается запустить API #153

Open
type2017 opened this issue Feb 17, 2017 · 0 comments
Open

Не удается запустить API #153

type2017 opened this issue Feb 17, 2017 · 0 comments

Comments

@type2017
Copy link

type2017 commented Feb 17, 2017

Здравствуйте,

Не удается запустить API,

# bin/chaussette paste:openprocurement.api.ini
Traceback (most recent call last):
File "bin/chaussette", line 54, in
sys.exit(chaussette.server.main())
File "/root/openprocurement.api/eggs/chaussette-1.3.0-py2.7.egg/chaussette/server.py", line 171, in main
app = paste_app(application.split(':')[-1])
File "/root/openprocurement.api/eggs/chaussette-1.3.0-py2.7.egg/chaussette/_paste.py", line 25, in paste_app
return loadapp('config:%s%s%s' % (os.path.abspath(path), hsh, app))
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 272, in loadobj
return context.create()
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 710, in create
return self.object_type.invoke(self)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 146, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/util.py", line 55, in fix_call
val = callable(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/openprocurement.api-2.3.46-py2.7.egg/openprocurement/api/init.py", line 64, in main
authentication_policy=AuthenticationPolicy(settings['auth.file'], name),
KeyError: 'auth.file'
Exception KeyError: KeyError(140624627097424,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored

содержимое openprocurement.api.ini
# cat openprocurement.api.ini
[app:main]
use = egg:openprocurement.api

couchdb.db_name = test
couchdb.url = http://localhost:5984/

pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en

[server:main]
use = egg:chaussette
host = 0.0.0.0
port = 6543
backend = gevent
auth.file = /root/openprocurement.api/auth.ini

вот содержимое auth.ini
# cat auth.ini
[auction]
auction = auction

[chronograph]
chronograph = chronograph

[Administrator]
administrator = administrator

[tests]
chrisr = chrisr

[brokers]
broker = broker
broker05 = broker05

[reviewers]
reviewer = reviewer

[admins]
test = token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant