ckan / ckanext-showcase

A ckan extension to showcase datasets in use
GNU Affero General Public License v3.0
43 stars 77 forks source link

KeyError: "Action 'related_list' not found" #74

Closed clauded closed 5 years ago

clauded commented 5 years ago

I'm testing a migration from CKAN 2.4 to 2.8. I restored my 2.4 DB and now I'm trying to migrate related tables. I installed the showcase plugin (from git) but I get the following error when running the migration:

(default) root@ckan:/usr/lib/ckan/default/src/ckanext-showcase# paster showcase migrate
2019-11-22 11:02:46,697 DEBUG [ckanext.showcase.model] ShowcasePackageAssociation table defined in memory
2019-11-22 11:02:46,711 DEBUG [ckanext.showcase.model] ShowcasePackageAssociation table already exists
2019-11-22 11:02:46,713 DEBUG [ckanext.showcase.model] ShowcaseAdmin table defined in memory
2019-11-22 11:02:46,715 DEBUG [ckanext.showcase.model] ShowcaseAdmin table already exists
2019-11-22 11:02:46,908 DEBUG [ckanext.showcase.model] ShowcasePackageAssociation table already exists
2019-11-22 11:02:46,911 DEBUG [ckanext.showcase.model] ShowcaseAdmin table already exists
Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/paster", line 8, in <module>
    sys.exit(run())
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/lib/ckan/default/src/ckanext-showcase/ckanext/showcase/commands/migrate.py", line 49, in command
    self.migrate()
  File "/usr/lib/ckan/default/src/ckanext-showcase/ckanext/showcase/commands/migrate.py", line 62, in migrate
    related_items = get_action('related_list')(data_dict={})
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 384, in get_action
    raise KeyError("Action '%s' not found" % action)
KeyError: "Action 'related_list' not found"
brew commented 5 years ago

Check out the readme:

The migrate command, detailed below, requires the Related Item models and actions, which have been removed in CKAN 2.6. If you wish to migrate your Related Items, please first upgrade CKAN to 2.5, do the migration, then continue upgrading to CKAN 2.6+.

clauded commented 5 years ago

Thanks for the info.

Chealer commented 4 years ago

Thank you very much @brew , but is version 2.5 really needed for this as the README seems to imply? Would migrating on 2.4 not be possible?

brew commented 4 years ago

Would migrating on 2.4 not be possible?

I think you're right – you can probably migrate on 2.4, as you suggest. But you can't migrate on versions beyond 2.5, as after that, related items were removed.

Chealer commented 4 years ago

Thanks again @brew We'll probably attempt a migration on 2.4 in a few weeks and report on the results here (or open a ticket asking to fix/clarify the README).