Skip to content

Issue initializing database for ckanext-validation on CKAN 2.11.3 #118

@duanjunhyq

Description

@duanjunhyq

Hi,

I’m using CKAN 2.11.3 and tried to add the ckanext-validation plugin, but I encountered an error when initializing the database.

if not tables_exist():
File "/home/ubuntu/ckan/lib/default/lib/python3.10/site-packages/ckanext/validation/model.py", line 53, in tables_exist
return Validation.table.exists()
File "", line 2, in exists
File "/usr/lib/ckan/default/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 468, in warned
return fn(*args, **kwargs)
File "/usr/lib/ckan/default/lib/python3.10/site-packages/sqlalchemy/sql/schema.py", line 941, in exists
bind = _bind_or_error(self)
File "/usr/lib/ckan/default/lib/python3.10/site-packages/sqlalchemy/sql/base.py", line 1659, in _bind_or_error
raise exc.UnboundExecutionError(msg)
sqlalchemy.exc.UnboundExecutionError: Table object 'validation' is not bound to an Engine or Connection. Execution can not proceed without a database to execute against.

Steps I followed:

git clone https://github.com/ckan/ckanext-validation.git
cd ckanext-validation
pip install -r requirements.txt
python setup.py develop

  1. Added validation to the ckan.plugins section of /etc/ckan/default/ckan.ini

  2. Ran:

ckan -c /etc/ckan/default/ckan.ini validation init-db

At step 3, I got the above error.

Could you please advise if there’s something I’m missing or if this is a compatibility issue with CKAN 2.11.3?

Thanks,
Jun

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions