ropensci / ckanr

R client for the CKAN API
https://docs.ropensci.org/ckanr
Other
99 stars 38 forks source link

Generate CKAN API key step in github actions failing for CKAN 2.8 #204

Closed fjuniorr closed 1 year ago

fjuniorr commented 1 year ago

Example here

Run echo "TEST_API_KEY"=$(docker exec ckan paster --plugin=ckan user ckan_admin | grep -o -P '(?<=apikey=).*(?= created)') >> $GITHUB_ENV
Traceback (most recent call last):
  File "/usr/bin/paster", line 11, in <module>
    load_entry_point('PasteScript==2.0.2', 'console_scripts', 'paster')()
  File "/usr/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/srv/app/src/ckan/ckan/lib/cli.py", line 870, in command
    self._load_config()
  File "/srv/app/src/ckan/ckan/lib/cli.py", line 330, in _load_config
    self.site_user = load_config(self.options.config, load_site_user)
  File "/srv/app/src/ckan/ckan/lib/cli.py", line 243, in load_config
    app = make_app(conf.global_conf, **conf.local_conf)
  File "/srv/app/src/ckan/ckan/config/middleware/__init__.py", line 58, in make_app
    **app_conf)
  File "/srv/app/src/ckan/ckan/config/middleware/pylons_app.py", line 67, in make_pylons_stack
    app = SessionMiddleware(app, config)
  File "/usr/lib/python2.7/site-packages/beaker/middleware.py", line 126, in __init__
    coerce_session_params(self.options)
  File "/usr/lib/python2.7/site-packages/beaker/util.py", line 3[18](https://github.com/ropensci/ckanr/actions/runs/4420343567/jobs/7749913635#step:9:19), in coerce_session_params
    opts = verify_rules(params, rules)
  File "/usr/lib/python2.7/site-packages/beaker/util.py", line 290, in verify_rules
    params[key] = verify_options(params[key], types, message)
  File "/usr/lib/python2.7/site-packages/beaker/util.py", line [28](https://github.com/ropensci/ckanr/actions/runs/4420343567/jobs/7749913635#step:9:29)3, in verify_options
    raise Exception("Empty strings are invalid for: %s" % error)
Exception: Empty strings are invalid for: Session secret must be a string.
fjuniorr commented 1 year ago

I was able to reproduce the error locally after downloading the newer docker image for CKAN. I've asked for help on the CKAN chat.