ckan / ckan/ckanext-validation

Issue initializing database for ckanext-validation on CKAN 2.11.3

Open
#118 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
30
Forks
33
PR merge metrics
No merged PRs in 30d

Description

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:

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

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

3. 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

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with CKAN 2.11.3 using the documented installation steps and `ckan validation init-db`. Start at `ckanext/validation/model.py` line 53, where `Validation.__table__.exists()` raises the unbound-execution error. Done means the extension database initialization completes successfully or the compatibility limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.