ProgrammingError: (ProgrammingError) relation "qa" does not exist
LINE 2: FROM qa JOIN resource ON qa.resource_id = resource.id
^
'SELECT qa.id AS qa_id, qa.package_id AS qa_package_id, qa.resource_id AS qa_resource_id, qa.resource_timestamp AS qa_resource_timestamp, qa.archival_timestamp AS qa_archival_timestamp, qa.openness_score AS qa_openness_score, qa.openness_score_reason AS qa_openness_score_reason, qa.format AS qa_format, qa.created AS qa_created, qa.updated AS qa_updated \nFROM qa JOIN resource ON qa.resource_id = resource.id \nWHERE qa.package_id = %(package_id_1)s AND resource.state = %(state_1)s' {'package_id_1': u'3503e083-12d9-43b2-aa50-989a71bc45b6', 'state_1': 'active'}
Traceback (most recent call last):
File "/home/co/ckan/bin/paster", line 9, in
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/home/co/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/home/co/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/home/co/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/vagrant/src/ckanext-dgu/ckanext/dgu/lib/cli.py", line 39, in command
DguCreateTestData.create_dgu_test_data()
File "/vagrant/src/ckanext-dgu/ckanext/dgu/testtools/create_test_data.py", line 523, in create_dgu_test_data
cls.create_arbitrary(cls._packages)
File "/vagrant/src/ckan/ckan/lib/create_test_data.py", line 262, in create_arbitrary
model.repo.commit_and_remove()
File "/home/co/ckan/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 112, in commit_and_remove
self.commit()
File "/home/co/ckan/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 102, in commit
self.session.commit()
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 114, in do
return getattr(self.registry(), name)(_args, _kwargs)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 656, in commit
self.transaction.commit()
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 314, in commit
self._prepare_impl()
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 290, in _prepare_impl
self.session.dispatch.before_commit(self.session)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 291, in call
fn(_args, _kw)
File "/vagrant/src/ckan/ckan/model/extension.py", line 112, in before_commit
methodcaller('before_commit', session)
File "/vagrant/src/ckan/ckan/model/extension.py", line 92, in notify_observers
func(observer)
File "/vagrant/src/ckan/ckan/model/modification.py", line 47, in before_commit
self.notify(obj, domain_object.DomainObjectOperation.new)
File "/vagrant/src/ckan/ckan/model/modification.py", line 79, in notify
observer.notify(entity, operation)
File "/vagrant/src/ckan/ckan/lib/search/init.py", line 129, in notify
operation
File "/vagrant/src/ckan/ckan/lib/search/init.py", line 101, in dispatch_by_operation
index.insert_dict(entity)
File "/vagrant/src/ckan/ckan/lib/search/index.py", line 79, in insert_dict
return self.update_dict(data)
File "/vagrant/src/ckan/ckan/lib/search/index.py", line 104, in update_dict
self.index_package(pkg_dict, defer_commit)
File "/vagrant/src/ckan/ckan/lib/search/index.py", line 260, in index_package
pkg_dict = item.before_index(pkg_dict)
File "/vagrant/src/ckanext-dgu/ckanext/dgu/plugin.py", line 549, in before_index
SearchIndexing.add_field__openness(pkg_dict)
File "/vagrant/src/ckanext-dgu/ckanext/dgu/search_indexing.py", line 215, in add_fieldopenness
qa_openness = get_action('qa_package_openness_show')(context, data_dict)
File "/vagrant/src/ckan/ckan/logic/init.py", line 425, in wrapped
result = _action(context, data_dict, **kw)
File "/vagrant/src/ckan/ckan/logic/init__.py", line 556, in wrapper
return action(context, data_dict)
File "/vagrant/src/ckanext-qa/ckanext/qa/logic_action.py", line 134, in qa_package_openness_show
for qa in QA.get_for_package(pkg_id):
File "/vagrant/src/ckanext-qa/ckanext/qa/model.py", line 74, in get_for_package
.filter(model.Resource.state=='active') \
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2115, in all
return list(self)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2227, in iter
return self._execute_and_instances(context)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
params)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
compiled_sql, distilled_params
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
context)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
context)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (ProgrammingError) relation "qa" does not exist
LINE 2: FROM qa JOIN resource ON qa.resource_id = resource.id
^
'SELECT qa.id AS qa_id, qa.package_id AS qa_package_id, qa.resource_id AS qa_resource_id, qa.resource_timestamp AS qa_resource_timestamp, qa.archival_timestamp AS qa_archival_timestamp, qa.openness_score AS qa_openness_score, qa.openness_score_reason AS qa_openness_score_reason, qa.format AS qa_format, qa.created AS qa_created, qa.updated AS qa_updated \nFROM qa JOIN resource ON qa.resource_id = resource.id \nWHERE qa.package_id = %(package_id_1)s AND resource.state = %(state_1)s' {'package_id_1': u'3503e083-12d9-43b2-aa50-989a71bc45b6', 'state_1': 'active'}
I'm following the tutorial and when I run
sudo -u www-data /home/co/ckan/bin/paster --plugin=ckanext-dgu create-test-data --config=ckan.ini
I have this error Can anybody help me?
ProgrammingError: (ProgrammingError) relation "qa" does not exist LINE 2: FROM qa JOIN resource ON qa.resource_id = resource.id ^ 'SELECT qa.id AS qa_id, qa.package_id AS qa_package_id, qa.resource_id AS qa_resource_id, qa.resource_timestamp AS qa_resource_timestamp, qa.archival_timestamp AS qa_archival_timestamp, qa.openness_score AS qa_openness_score, qa.openness_score_reason AS qa_openness_score_reason, qa.format AS qa_format, qa.created AS qa_created, qa.updated AS qa_updated \nFROM qa JOIN resource ON qa.resource_id = resource.id \nWHERE qa.package_id = %(package_id_1)s AND resource.state = %(state_1)s' {'package_id_1': u'3503e083-12d9-43b2-aa50-989a71bc45b6', 'state_1': 'active'} Traceback (most recent call last): File "/home/co/ckan/bin/paster", line 9, in
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/home/co/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/home/co/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/home/co/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/vagrant/src/ckanext-dgu/ckanext/dgu/lib/cli.py", line 39, in command
DguCreateTestData.create_dgu_test_data()
File "/vagrant/src/ckanext-dgu/ckanext/dgu/testtools/create_test_data.py", line 523, in create_dgu_test_data
cls.create_arbitrary(cls._packages)
File "/vagrant/src/ckan/ckan/lib/create_test_data.py", line 262, in create_arbitrary
model.repo.commit_and_remove()
File "/home/co/ckan/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 112, in commit_and_remove
self.commit()
File "/home/co/ckan/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 102, in commit
self.session.commit()
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 114, in do
return getattr(self.registry(), name)(_args, _kwargs)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 656, in commit
self.transaction.commit()
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 314, in commit
self._prepare_impl()
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 290, in _prepare_impl
self.session.dispatch.before_commit(self.session)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 291, in call
fn(_args, _kw)
File "/vagrant/src/ckan/ckan/model/extension.py", line 112, in before_commit
methodcaller('before_commit', session)
File "/vagrant/src/ckan/ckan/model/extension.py", line 92, in notify_observers
func(observer)
File "/vagrant/src/ckan/ckan/model/modification.py", line 47, in before_commit
self.notify(obj, domain_object.DomainObjectOperation.new)
File "/vagrant/src/ckan/ckan/model/modification.py", line 79, in notify
observer.notify(entity, operation)
File "/vagrant/src/ckan/ckan/lib/search/init.py", line 129, in notify
operation
File "/vagrant/src/ckan/ckan/lib/search/init.py", line 101, in dispatch_by_operation
index.insert_dict(entity)
File "/vagrant/src/ckan/ckan/lib/search/index.py", line 79, in insert_dict
return self.update_dict(data)
File "/vagrant/src/ckan/ckan/lib/search/index.py", line 104, in update_dict
self.index_package(pkg_dict, defer_commit)
File "/vagrant/src/ckan/ckan/lib/search/index.py", line 260, in index_package
pkg_dict = item.before_index(pkg_dict)
File "/vagrant/src/ckanext-dgu/ckanext/dgu/plugin.py", line 549, in before_index
SearchIndexing.add_field__openness(pkg_dict)
File "/vagrant/src/ckanext-dgu/ckanext/dgu/search_indexing.py", line 215, in add_fieldopenness
qa_openness = get_action('qa_package_openness_show')(context, data_dict)
File "/vagrant/src/ckan/ckan/logic/init.py", line 425, in wrapped
result = _action(context, data_dict, **kw)
File "/vagrant/src/ckan/ckan/logic/init__.py", line 556, in wrapper
return action(context, data_dict)
File "/vagrant/src/ckanext-qa/ckanext/qa/logic_action.py", line 134, in qa_package_openness_show
for qa in QA.get_for_package(pkg_id):
File "/vagrant/src/ckanext-qa/ckanext/qa/model.py", line 74, in get_for_package
.filter(model.Resource.state=='active') \
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2115, in all
return list(self)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2227, in iter
return self._execute_and_instances(context)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
params)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
compiled_sql, distilled_params
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
context)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
context)
File "/home/co/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (ProgrammingError) relation "qa" does not exist
LINE 2: FROM qa JOIN resource ON qa.resource_id = resource.id
^
'SELECT qa.id AS qa_id, qa.package_id AS qa_package_id, qa.resource_id AS qa_resource_id, qa.resource_timestamp AS qa_resource_timestamp, qa.archival_timestamp AS qa_archival_timestamp, qa.openness_score AS qa_openness_score, qa.openness_score_reason AS qa_openness_score_reason, qa.format AS qa_format, qa.created AS qa_created, qa.updated AS qa_updated \nFROM qa JOIN resource ON qa.resource_id = resource.id \nWHERE qa.package_id = %(package_id_1)s AND resource.state = %(state_1)s' {'package_id_1': u'3503e083-12d9-43b2-aa50-989a71bc45b6', 'state_1': 'active'}