openfisca / openfisca-web-api

[DEPRECATED] Web API for OpenFisca
https://www.openfisca.fr/
GNU Affero General Public License v3.0
13 stars 11 forks source link

Docker fails #6

Closed MattiSG closed 9 years ago

MattiSG commented 9 years ago

If I use the given Docker instructions, then nothing happens and the API is unavailable.

However, if I remove the -d (“detach”) switch, I get the following error:

Traceback (most recent call last):
  File "/usr/bin/paster", line 4, in <module>
    command.run()
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 238, in run
    result = self.command()
  File "/usr/lib/python2.7/dist-packages/paste/script/serve.py", line 284, in command
    relative_to=base, global_conf=vars)
  File "/usr/lib/python2.7/dist-packages/paste/script/serve.py", line 321, in loadapp
    **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
    val = callable(*args, **kw)
  File "/src/openfisca-web-api/openfisca_web_api/application.py", line 61, in make_app
    environment.load_environment(global_conf, app_conf)
  File "/src/openfisca-web-api/openfisca_web_api/environment.py", line 90, in load_environment
    ))(conf))
  File "/src/biryani1/biryani1/baseconv.py", line 2616, in check_converter
    raise ValueError(u'{0} for: {1}'.format(error, value).encode('utf-8'))
ValueError: {'reforms': {u'plfrss2014': u'No module named plfrss2014'}} for: {'global_conf': None, 'realm': u'OpenFisca Web API', 'load_alert': False, 'package_name': 'openfisca-web-api', 'i18n_dir': '/src/openfisca-web-api/openfisca_web_api/i18n', 'app_dir': None, 'country_package': u'openfisca_france', 'cache_dir': u'/src/openfisca-web-api/cache', 'app_conf': None, 'reforms': OrderedDict([(u'landais_piketty_saez', <function build_reform at 0x7f601253f578>), (u'plfrss2014', [u'openfisca_france.reforms.plfrss2014', u'build_reform'])]), 'debug': True, 'log_level': 10}
cbenz commented 9 years ago

Should work after merging your PR #8

MattiSG commented 9 years ago

No, I'm sorry but if I

docker pull openfisca/openfisca-web-api-france:latest
docker run -p 2000:2000 openfisca/openfisca-web-api-france:latest

…then Docker just hangs. This issue should be reopened.

cbenz commented 9 years ago

It works for me, let's check together

MattiSG commented 9 years ago

Confirmed to work. Docker does hang if not run with --detach, but that doesn't seem to be a major issue as the use cases for not detaching don't seem legit.