Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

ckan db init attempts to update i18n files #380

Open
adborden opened this issue Aug 10, 2020 · 0 comments
Open

ckan db init attempts to update i18n files #380

adborden opened this issue Aug 10, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@adborden
Copy link
Contributor

$ sudo -u www-data /usr/lib/ckan/bin/paster --plugin=ckan db init -c /etc/ckan/production.ini
Traceback (most recent call last):
  File "/usr/lib/ckan/bin/paster", line 8, in <module>
    sys.exit(run())
  File "/usr/lib/ckan-new/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/ckan-new/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/ckan-new/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/lib/ckan-new/src/ckan/ckan/lib/cli.py", line 357, in command
    self._load_config(cmd!='upgrade')
  File "/usr/lib/ckan-new/src/ckan/ckan/lib/cli.py", line 330, in _load_config
    self.site_user = load_config(self.options.config, load_site_user)
  File "/usr/lib/ckan-new/src/ckan/ckan/lib/cli.py", line 237, in load_config
    load_environment(conf.global_conf, conf.local_conf)
  File "/usr/lib/ckan-new/src/ckan/ckan/config/environment.py", line 131, in load_environment
    build_js_translations()
  File "/usr/lib/ckan-new/src/ckan/ckan/lib/i18n.py", line 408, in build_js_translations
    _build_js_translation(lang, po_files, js_entries, dest_file)
  File "/usr/lib/ckan-new/src/ckan/ckan/lib/i18n.py", line 348, in _build_js_translation
    with open(dest_filename, u'w') as f:
IOError: [Errno 13] Permission denied: u'/usr/lib/ckan-new/src/ckan/ckan/public/base/i18n/km.js'

How to reproduce

From catalogharvester1d:

  1. sudo -u www-data /usr/lib/ckan/bin/paster --plugin=ckan db init -c /etc/ckan/production.ini

Expected behavior

Database is initialized successfully, no attempt to modify files is made.

Actual behavior

DB initialization attempts to modify i18n javascript files.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant