PublicaMundi / ckanext-publicamundi

PublicaMundi main CKAN extension
http://publicamundi.eu
Other
13 stars 12 forks source link

Setup tables on ckan 2.5.1 #228

Open bunnis opened 8 years ago

bunnis commented 8 years ago

Using newer version of ckan 2.5.1 with this extensions brings some problems: -geoalchemy is no longer supported with current sqlalchemy version, udpated references to geoalchemy2

as of right now I only have enabled publicamundi_package, dont know if this is related to my error or not -i adressed some of this issues, but after trying to add a dataset to ckan i got this error:

[Thu Feb 04 14:43:05.951355 2016] [:error] [pid 14422:tid 140692987135744] [remote 127.0.0.1:7082] ProgrammingError: (ProgrammingError) relation "records" does not exist [Thu Feb 04 14:43:05.951362 2016] [:error] [pid 14422:tid 140692987135744] [remote 127.0.0.1:7082] LINE 2: FROM records [Thu Feb 04 14:43:05.951369 2016] [:error] [pid 14422:tid 140692987135744] [remote 127.0.0.1:7082] ^ [Thu Feb 04 14:43:05.951379 2016] [:error] [pid 14422:tid 140692987135744] [remote 127.0.0.1:7082] 'SELECT records.identifier AS records_identifier, records.typename AS records_typename, records.schema AS records_schema, records.mdsource AS records_mdsource, records.insert_date AS records_insert_date, records.xml AS records_xml, records.anytext AS records_anytext, records.language AS records_language, records.type AS records_type, records.title AS records_title, records.title_alternate AS.............

kalxas commented 8 years ago

This extension is based on CKAN 2.2 and has not been tested in latest versions. Thank you for the feedback, we will look into this.

bunnis commented 8 years ago

Any idea why? Did ckan team changed the schema? Or is the record something related to this extension only?

drmalex07 commented 8 years ago

Have you created the CSW-related tables before trying to enable the publicamundi_package plugin ?

The above stacktrace clearly says:

ProgrammingError: (ProgrammingError) relation "records" does not exist

This table (records) is part of the CSW model

bunnis commented 8 years ago

I used the paster setup commands which (at the source code) says it will install databases and such https://github.com/PublicaMundi/ckanext-publicamundi/blob/master/ckanext/publicamundi/commands.py#L127

drmalex07 commented 8 years ago

Was it successfull? Can you post the output?

bunnis commented 8 years ago

yes, no errors. output: $ paster --plugin=ckanext-harvest harvester initdb -c /etc/ckan/default/production.ini /usr/lib/ckan/default/src/ckan/ckan/new_authz.py:6: FutureWarning: ckan.new_authz has been renamed to ckan.authz. The ckan.new_authz module will be removed in a future release. FutureWarning) 2016-02-04 15:03:05,623 DEBUG [ckanext.harvest.model] Harvest tables defined in memory 2016-02-04 15:03:05,626 DEBUG [ckanext.harvest.model] Harvest tables already exist 2016-02-04 15:03:05,639 DEBUG [ckanext.spatial.plugin] Setting up the spatial model 2016-02-04 15:03:05,645 DEBUG [ckanext.spatial.model.package_extent] Spatial tables defined in memory 2016-02-04 15:03:05,661 DEBUG [ckanext.spatial.model.package_extent] Spatial tables already exist 2016-02-04 15:03:05,662 INFO [ckanext.publicamundi.lib.pycsw_sync] Read pyCSW config from /etc/ckan/default/pycsw.cfg 2016-02-04 15:03:05,662 INFO [ckanext.publicamundi.lib.pycsw_sync] Initialized module globals from Pylons config

2016-02-04 15:03:05,703 DEBUG [ckanext.harvest.model] Harvest tables already exist DB tables created (default)bunny@DEIMOS:/usr/lib/ckan/default/src/ckanext-publicamundi$

drmalex07 commented 8 years ago

The above example is initializing harvester-related tables (ckanext-harvest is another extension).

To set things up for ckanext-publicamundi you should run something like:

paster --plugin=ckanext-publicamundi publicamundi --config config.ini setup 
bunnis commented 8 years ago

my bad, this is the correct output. i'm also attaching the apache output when adding a new dataset

$ paster --plugin=ckanext-publicamundi publicamundi -c /etc/ckan/default/production.ini setup /usr/lib/ckan/default/src/ckan/ckan/new_authz.py:6: FutureWarning: ckan.new_authz has been renamed to ckan.authz. The ckan.new_authz module will be removed in a future release. FutureWarning) 2016-02-04 15:03:09,484 DEBUG [ckanext.harvest.model] Harvest tables defined in memory 2016-02-04 15:03:09,487 DEBUG [ckanext.harvest.model] Harvest tables already exist 2016-02-04 15:03:09,500 DEBUG [ckanext.spatial.plugin] Setting up the spatial model 2016-02-04 15:03:09,506 DEBUG [ckanext.spatial.model.package_extent] Spatial tables defined in memory 2016-02-04 15:03:09,520 DEBUG [ckanext.spatial.model.package_extent] Spatial tables already exist 2016-02-04 15:03:09,521 INFO [ckanext.publicamundi.lib.pycsw_sync] Read pyCSW config from /etc/ckan/default/pycsw.cfg 2016-02-04 15:03:09,521 INFO [ckanext.publicamundi.lib.pycsw_sync] Initialized module globals from Pylons config 2016-02-04 15:03:09,566 INFO [ckanext.publicamundi] Setup complete

[Thu Feb 04 15:04:11.351316 2016] [:error] [pid 14423:tid 140692961957632] 2016-02-04 15:04:11,351 DEBUG [ckanext.publicamundi.plugins] A package was updated: 9d3182c4-1ddf-4f9c-9fd8-5a067419116b [Thu Feb 04 15:04:11.351631 2016] [:error] [pid 14423:tid 140692961957632] 2016-02-04 15:04:11,351 INFO [ckanext.publicamundi.plugins] Skipped sync of non-active dataset 9d3182c4-1ddf-4f9c-9fd8-5a067419116b to CSW record [Thu Feb 04 15:04:11.526008 2016] [:error] [pid 14423:tid 140692961957632] 2016-02-04 15:04:11,525 DEBUG [ckanext.publicamundi.plugins] A package was updated: 9d3182c4-1ddf-4f9c-9fd8-5a067419116b [Thu Feb 04 15:04:11.601229 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] Error - <class 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError) relation "records" does not exist [Thu Feb 04 15:04:11.601321 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] LINE 2: FROM records [Thu Feb 04 15:04:11.601488 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] ^ [Thu Feb 04 15:04:11.601526 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] 'SELECT records.identifier AS records_identifier, records.typename AS records_typename, records.schema AS records_schema, records.mdsource AS records_mdsource, records.insert_date AS records_insert_date, records.xml AS records_xml, records.anytext AS records_anytext, records.language AS records_language, records.type AS records_type, records.title AS records_title, records.title_alternate AS records_title_alternate, records.abstract AS records_abstract, records.keywords AS records_keywords, records.keywordstype AS records_keywordstype, records.parentidentifier AS records_parentidentifier, records.relation AS records_relation, records.time_begin AS records_time_begin, records.time_end AS records_time_end, records.topicategory AS records_topicategory, records.resourcelanguage AS records_resourcelanguage, records.creator AS records_creator, records.publisher AS records_publisher, records.contributor AS records_contributor, records.organization AS records_organization, records.securityconstraints AS records_securityconstraints, records.accessconstraints AS records_accessconstraints, records.otherconstraints AS records_otherconstraints, records.date AS records_date, records.date_revision AS records_date_revision, records.date_creation AS records_date_creation, records.date_publication AS records_date_publication, records.date_modified AS records_date_modified, records.format AS records_format, records.source AS records_source, records.crs AS records_crs, records.geodescode AS records_geodescode, records.denominator AS records_denominator, records.distancevalue AS records_distancevalue, records.distanceuom AS records_distanceuom, records.wkt_geometry AS records_wkt_geometry, records.servicetype AS records_servicetype, records.servicetypeversion AS records_servicetypeversion, records.operation AS records_operation, records.couplingtype AS records_couplingtype, records.operateson AS records_operateson, records.operatesonidentifier AS records_operatesonidentifier, records.operatesoname AS records_operatesoname, records.degree AS records_degree, records.classification AS records_classification, records.conditionapplyingtoaccessanduse AS records_conditionapplyingtoaccessanduse, records.lineage AS records_lineage, records.responsiblepartyrole AS records_responsiblepartyrole, records.specificationtitle AS records_specificationtitle, records.specificationdate AS records_specificationdate, records.specificationdatetype AS records_specificationdatetype, records.links AS records_links, records.ckan_id AS records_ckan_id, records.ckan_modified AS records_ckan_modified, records.anytext_tsvector AS records_anytext_tsvector, ST_AsBinary(records.wkb_geometry) AS records_wkb_geometry \nFROM records \nWHERE records.identifier = %(param_1)s' {'param_1': u'9d3182c4-1ddf-4f9c-9fd8-5a067419116b'} [Thu Feb 04 15:04:11.608213 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] URL: http://100.100.0.200/dataset/new_resource/testeas [Thu Feb 04 15:04:11.608310 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/weberror/errormiddleware.py', line 171 in call [Thu Feb 04 15:04:11.608369 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] app_iter = self.application(environ, sr_checker) [Thu Feb 04 15:04:11.608407 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line 147 in call [Thu Feb 04 15:04:11.608439 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] resp = self.call_func(req, _args, _self.kwargs) [Thu Feb 04 15:04:11.608479 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line 208 in call_func [Thu Feb 04 15:04:11.608521 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return self.func(req, _args, _kwargs) [Thu Feb 04 15:04:11.608564 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/fanstatic/publisher.py', line 234 in call [Thu Feb 04 15:04:11.608611 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return request.get_response(self.app) [Thu Feb 04 15:04:11.608642 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py', line 1053 in get_response [Thu Feb 04 15:04:11.608674 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] application, catch_exc_info=False) [Thu Feb 04 15:04:11.608709 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py', line 1022 in call_application [Thu Feb 04 15:04:11.608747 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] app_iter = application(self.environ, start_response) [Thu Feb 04 15:04:11.608776 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line 147 in call [Thu Feb 04 15:04:11.608806 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] resp = self.call_func(req, _args, _self.kwargs) [Thu Feb 04 15:04:11.608837 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line 208 in call_func [Thu Feb 04 15:04:11.608886 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return self.func(req, _args, _kwargs) [Thu Feb 04 15:04:11.608920 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/fanstatic/injector.py', line 54 in call [Thu Feb 04 15:04:11.608972 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] response = request.get_response(self.app) [Thu Feb 04 15:04:11.609031 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py', line 1053 in get_response [Thu Feb 04 15:04:11.609064 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] application, catch_exc_info=False) [Thu Feb 04 15:04:11.609095 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py', line 1022 in call_application [Thu Feb 04 15:04:11.609172 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] app_iter = application(self.environ, start_response) [Thu Feb 04 15:04:11.609213 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py', line 389 in inner [Thu Feb 04 15:04:11.609256 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] result = application(environ, start_response) [Thu Feb 04 15:04:11.609285 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/beaker/middleware.py', line 73 in call [Thu Feb 04 15:04:11.609327 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return self.app(environ, start_response) [Thu Feb 04 15:04:11.609437 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/beaker/middleware.py', line 155 in call [Thu Feb 04 15:04:11.609502 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return self.wrap_app(environ, session_start_response) [Thu Feb 04 15:04:11.609536 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/routes/middleware.py', line 131 in call [Thu Feb 04 15:04:11.609574 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] response = self.app(environ, start_response) [Thu Feb 04 15:04:11.609604 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/wsgiapp.py', line 125 in call [Thu Feb 04 15:04:11.609643 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] response = self.dispatch(controller, environ, start_response) [Thu Feb 04 15:04:11.609682 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/wsgiapp.py', line 324 in dispatch [Thu Feb 04 15:04:11.609723 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return controller(environ, start_response) [Thu Feb 04 15:04:11.609769 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 337 in call [Thu Feb 04 15:04:11.609808 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] res = WSGIController.call(self, environ, start_response) [Thu Feb 04 15:04:11.609838 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py', line 221 in call [Thu Feb 04 15:04:11.609890 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] response = self._dispatch_call() [Thu Feb 04 15:04:11.609943 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py', line 172 in _dispatch_call [Thu Feb 04 15:04:11.609995 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] response = self._inspect_call(func) [Thu Feb 04 15:04:11.610033 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py', line 107 in _inspect_call [Thu Feb 04 15:04:11.610078 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] result = self._perform_call(func, args) [Thu Feb 04 15:04:11.610114 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py', line 60 in _perform_call [Thu Feb 04 15:04:11.610144 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return func(args) [Thu Feb 04 15:04:11.610174 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/src/ckan/ckan/controllers/package.py', line 699 in new_resource [Thu Feb 04 15:04:11.610221 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] dict(data_dict, state='active')) [Thu Feb 04 15:04:11.610257 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/src/ckan/ckan/logic/init.py', line 416 in wrapped [Thu Feb 04 15:04:11.610295 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] result = _action(context, data_dict, kw) [Thu Feb 04 15:04:11.610325 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/src/ckan/ckan/logic/action/update.py', line 365 in package_update [Thu Feb 04 15:04:11.610356 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] item.after_update(context, data) [Thu Feb 04 15:04:11.610398 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/src/ckanext-publicamundi/ckanext/publicamundi/plugins.py', line 688 in after_update [Thu Feb 04 15:04:11.610435 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] self._create_or_update_csw_record(context['session'], pkg_dict) [Thu Feb 04 15:04:11.610465 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/src/ckanext-publicamundi/ckanext/publicamundi/plugins.py', line 854 in _create_or_update_csw_record [Thu Feb 04 15:04:11.610497 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] record = ext_pycsw_sync.create_or_update_record(session, pkg_dict) [Thu Feb 04 15:04:11.610535 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/src/ckanext-publicamundi/ckanext/publicamundi/lib/pycsw_sync.py', line 81 in create_or_update_record [Thu Feb 04 15:04:11.610581 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] existing_record = session.query(repo.dataset).get(pkg_dict['id']) [Thu Feb 04 15:04:11.610625 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/orm/query.py', line 816 in get [Thu Feb 04 15:04:11.610667 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return loading.load_on_ident(self, key) [Thu Feb 04 15:04:11.610734 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/orm/loading.py', line 230 in load_on_ident [Thu Feb 04 15:04:11.610773 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return q.one() [Thu Feb 04 15:04:11.610809 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/orm/query.py', line 2362 in one [Thu Feb 04 15:04:11.610844 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] ret = list(self) [Thu Feb 04 15:04:11.610886 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/orm/query.py', line 2405 in iter [Thu Feb 04 15:04:11.610920 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return self._execute_and_instances(context) [Thu Feb 04 15:04:11.610992 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/orm/query.py', line 2420 in _execute_and_instances [Thu Feb 04 15:04:11.611046 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] result = conn.execute(querycontext.statement, self._params) [Thu Feb 04 15:04:11.611085 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 727 in execute [Thu Feb 04 15:04:11.611116 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return meth(self, multiparams, params) [Thu Feb 04 15:04:11.611146 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/sql/elements.py', line 322 in _execute_on_connection [Thu Feb 04 15:04:11.611183 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] return connection._execute_clauseelement(self, multiparams, params) [Thu Feb 04 15:04:11.611213 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 824 in _execute_clauseelement [Thu Feb 04 15:04:11.611263 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] compiled_sql, distilled_params [Thu Feb 04 15:04:11.611294 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 954 in _execute_context [Thu Feb 04 15:04:11.611341 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] context) [Thu Feb 04 15:04:11.611402 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 1116 in _handle_dbapi_exception [Thu Feb 04 15:04:11.611441 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] exc_info [Thu Feb 04 15:04:11.611472 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/util/compat.py', line 189 in raise_from_cause [Thu Feb 04 15:04:11.611512 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] reraise(type(exception), exception, tb=exc_tb) [Thu Feb 04 15:04:11.611567 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 947 in _execute_context [Thu Feb 04 15:04:11.611608 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] context) [Thu Feb 04 15:04:11.611646 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/default.py', line 435 in do_execute [Thu Feb 04 15:04:11.611675 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] cursor.execute(statement, parameters) [Thu Feb 04 15:04:11.611719 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] ProgrammingError: (ProgrammingError) relation "records" does not exist [Thu Feb 04 15:04:11.611752 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] LINE 2: FROM records [Thu Feb 04 15:04:11.611785 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] ^ [Thu Feb 04 15:04:11.611834 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] 'SELECT records.identifier AS records_identifier, records.typename AS records_typename, records.schema AS records_schema, records.mdsource AS records_mdsource, records.insert_date AS records_insert_date, records.xml AS records_xml, records.anytext AS records_anytext, records.language AS records_language, records.type AS records_type, records.title AS records_title, records.title_alternate AS records_title_alternate, records.abstract AS records_abstract, records.keywords AS records_keywords, records.keywordstype AS records_keywordstype, records.parentidentifier AS records_parentidentifier, records.relation AS records_relation, records.time_begin AS records_time_begin, records.time_end AS records_time_end, records.topicategory AS records_topicategory, records.resourcelanguage AS records_resourcelanguage, records.creator AS records_creator, records.publisher AS records_publisher, records.contributor AS records_contributor, records.organization AS records_organization, records.securityconstraints AS records_securityconstraints, records.accessconstraints AS records_accessconstraints, records.otherconstraints AS records_otherconstraints, records.date AS records_date, records.date_revision AS records_date_revision, records.date_creation AS records_date_creation, records.date_publication AS records_date_publication, records.date_modified AS records_date_modified, records.format AS records_format, records.source AS records_source, records.crs AS records_crs, records.geodescode AS records_geodescode, records.denominator AS records_denominator, records.distancevalue AS records_distancevalue, records.distanceuom AS records_distanceuom, records.wkt_geometry AS records_wkt_geometry, records.servicetype AS records_servicetype, records.servicetypeversion AS records_servicetypeversion, records.operation AS records_operation, records.couplingtype AS records_couplingtype, records.operateson AS records_operateson, records.operatesonidentifier AS records_operatesonidentifier, records.operatesoname AS records_operatesoname, records.degree AS records_degree, records.classification AS records_classification, records.conditionapplyingtoaccessanduse AS records_conditionapplyingtoaccessanduse, records.lineage AS records_lineage, records.responsiblepartyrole AS records_responsiblepartyrole, records.specificationtitle AS records_specificationtitle, records.specificationdate AS records_specificationdate, records.specificationdatetype AS records_specificationdatetype, records.links AS records_links, records.ckan_id AS records_ckan_id, records.ckan_modified AS records_ckan_modified, records.anytext_tsvector AS records_anytext_tsvector, ST_AsBinary(records.wkb_geometry) AS records_wkb_geometry \nFROM records \nWHERE records.identifier = %(param_1)s' {'param_1': u'9d3182c4-1ddf-4f9c-9fd8-5a067419116b'} [Thu Feb 04 15:04:11.611917 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] [Thu Feb 04 15:04:11.611966 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] [Thu Feb 04 15:04:11.612017 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] CGI Variables [Thu Feb 04 15:04:11.612058 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] ------------- [Thu Feb 04 15:04:11.612094 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] AUTH_TYPE: 'cookie' [Thu Feb 04 15:04:11.612123 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] CKAN_CURRENT_URL: '/dataset/new_resource/testeas' [Thu Feb 04 15:04:11.612152 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] CKAN_LANG: 'en' [Thu Feb 04 15:04:11.612181 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] CKAN_LANG_IS_DEFAULT: True [Thu Feb 04 15:04:11.612212 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] CONTENT_TYPE: 'multipart/form-data; boundary=----WebKitFormBoundaryWMRauz8ovVZqg0iD; charset=utf-8' [Thu Feb 04 15:04:11.612245 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] CONTEXT_DOCUMENT_ROOT: '/var/www' [Thu Feb 04 15:04:11.612287 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] DOCUMENT_ROOT: '/var/www' [Thu Feb 04 15:04:11.612335 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] GATEWAY_INTERFACE: 'CGI/1.1' [Thu Feb 04 15:04:11.612373 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTPACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/_;q=0.8' [Thu Feb 04 15:04:11.612404 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_ACCEPT_ENCODING: 'gzip, deflate' [Thu Feb 04 15:04:11.612444 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_ACCEPT_LANGUAGE: 'pt-PT,pt;q=0.8,en-US;q=0.6,en;q=0.4' [Thu Feb 04 15:04:11.612479 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_CACHE_CONTROL: 'max-age=0' [Thu Feb 04 15:04:11.612517 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_CONNECTION: 'close' [Thu Feb 04 15:04:11.612555 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_COOKIE: 'auth_tkt="80119b2b1134599b8f1c52edff60b885569fcdb0deimos!userid_type:unicode"; ckan=d38bcf19a660ca76f9d333f473291401774640821fb4016dd2be473393ce258d4bc1db9c' [Thu Feb 04 15:04:11.612592 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_HOST: '100.100.0.200' [Thu Feb 04 15:04:11.612621 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_ORIGIN: 'http://100.100.0.200' [Thu Feb 04 15:04:11.612650 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_REFERER: 'http://100.100.0.200/dataset/new_resource/testeas' [Thu Feb 04 15:04:11.612680 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_UPGRADE_INSECURE_REQUESTS: '1' [Thu Feb 04 15:04:11.612721 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] HTTP_USER_AGENT: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36' [Thu Feb 04 15:04:11.612758 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] PATH_INFO: '/dataset/new_resource/testeas' [Thu Feb 04 15:04:11.612796 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] PATH_TRANSLATED: '/etc/ckan/default/apache.wsgi/dataset/new_resource/testeas' [Thu Feb 04 15:04:11.612828 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] REMOTE_ADDR: '127.0.0.1' [Thu Feb 04 15:04:11.612858 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] REMOTE_PORT: '37239' [Thu Feb 04 15:04:11.612904 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] REMOTE_USER: u'deimos' [Thu Feb 04 15:04:11.612966 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] REMOTE_USER_DATA: 'userid_type:unicode' [Thu Feb 04 15:04:11.613011 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] REMOTE_USER_TOKENS: [''] [Thu Feb 04 15:04:11.613046 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] REQUEST_METHOD: 'POST' [Thu Feb 04 15:04:11.613086 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] REQUEST_SCHEME: 'http' [Thu Feb 04 15:04:11.613122 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] REQUEST_URI: '/dataset/new_resource/testeas' [Thu Feb 04 15:04:11.613151 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] SCRIPT_FILENAME: '/etc/ckan/default/apache.wsgi' [Thu Feb 04 15:04:11.613195 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] SERVER_ADDR: '127.0.0.1' [Thu Feb 04 15:04:11.613246 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] SERVER_ADMIN: '[no address given]' [Thu Feb 04 15:04:11.613303 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] SERVER_NAME: '100.100.0.200' [Thu Feb 04 15:04:11.613335 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] SERVER_PORT: '80' [Thu Feb 04 15:04:11.613459 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] SERVER_PROTOCOL: 'HTTP/1.0' [Thu Feb 04 15:04:11.613506 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] SERVER_SIGNATURE: '

Apache/2.4.7 (Ubuntu) Server at 100.100.0.200 Port 80
\n' [Thu Feb 04 15:04:11.613543 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] SERVER_SOFTWARE: 'Apache/2.4.7 (Ubuntu)' [Thu Feb 04 15:04:11.613581 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] [Thu Feb 04 15:04:11.613624 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] [Thu Feb 04 15:04:11.613660 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] WSGI Variables [Thu Feb 04 15:04:11.613688 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] -------------- [Thu Feb 04 15:04:11.613718 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] application: <fanstatic.publisher.Delegator object at 0x7ff5889e3350> [Thu Feb 04 15:04:11.613748 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] beaker.cache: <beaker.cache.CacheManager object at 0x7ff5889e33d0> [Thu Feb 04 15:04:11.613789 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] beaker.get_session: <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0x7ff5889c9510>> [Thu Feb 04 15:04:11.613828 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] beaker.session: {'_accessed_time': 1454598251.601952, '_creation_time': 1454598251.601952} [Thu Feb 04 15:04:11.613871 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] fanstatic.needed: <fanstatic.core.NeededResources object at 0x7ff587b531d0> [Thu Feb 04 15:04:11.613910 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.application_group: 'default.ckanhosted.com|' [Thu Feb 04 15:04:11.613956 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.callable_object: 'application' [Thu Feb 04 15:04:11.614010 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.enable_sendfile: '0' [Thu Feb 04 15:04:11.614048 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.handler_script: '' [Thu Feb 04 15:04:11.614078 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.input_chunked: '0' [Thu Feb 04 15:04:11.614107 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.listener_host: '' [Thu Feb 04 15:04:11.614138 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.listener_port: '8080' [Thu Feb 04 15:04:11.614180 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.process_group: 'ckan_default' [Thu Feb 04 15:04:11.614210 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.queue_start: '1454598251287557' [Thu Feb 04 15:04:11.614241 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.request_handler: 'wsgi-script' [Thu Feb 04 15:04:11.614271 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.script_reloading: '1' [Thu Feb 04 15:04:11.614303 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] mod_wsgi.version: (3, 4) [Thu Feb 04 15:04:11.614350 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] paste.cookies: (, 'auth_tkt="80119b2b1134599b8f1c52edff60b885569fcdb0deimos!userid_type:unicode"; ckan=d38bcf19a660ca76f9d333f473291401774640821fb4016dd2be473393ce258d4bc1db9c') [Thu Feb 04 15:04:11.614398 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] paste.registry: <paste.registry.Registry object at 0x7ff587ac9550> [Thu Feb 04 15:04:11.614448 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] paste.throw_errors: True [Thu Feb 04 15:04:11.614493 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] pylons.action_method: <bound method PackageController.new_resource of <ckan.controllers.package.PackageController object at 0x7ff5862adb50>> [Thu Feb 04 15:04:11.614538 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] pylons.controller: <ckan.controllers.package.PackageController object at 0x7ff5862adb50> [Thu Feb 04 15:04:11.614577 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] pylons.environ_config: {'session': 'beaker.session', 'cache': 'beaker.cache'} [Thu Feb 04 15:04:11.614607 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] pylons.pylons: <pylons.util.PylonsContext object at 0x7ff5862ad790> [Thu Feb 04 15:04:11.614637 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] pylons.routes_dict: {'action': u'new_resource', 'controller': u'package', 'id': u'testeas'} [Thu Feb 04 15:04:11.614667 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] repoze.who.api: <repoze.who.api.API object at 0x7ff5889c96d0> [Thu Feb 04 15:04:11.614703 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] repoze.who.identity: <repoze.who identity (hidden, dict-like) at 140692494284016> [Thu Feb 04 15:04:11.614742 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] repoze.who.logger: <logging.Logger object at 0x7ff58f3e3950> [Thu Feb 04 15:04:11.614783 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] repoze.who.plugins: {'ckan.lib.authenticator:UsernamePasswordAuthenticator': <ckan.lib.authenticator.UsernamePasswordAuthenticator object at 0x7ff58f3e3990>, 'friendlyform': <FriendlyFormPlugin 140692535854544>, 'auth_tkt': <CkanAuthTktCookiePlugin 140692535854480>} [Thu Feb 04 15:04:11.614816 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] routes.route: <routes.route.Route object at 0x7ff588af5f90> [Thu Feb 04 15:04:11.614846 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] routes.url: <routes.util.URLGenerator object at 0x7ff5862ad2d0> [Thu Feb 04 15:04:11.614887 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] webob._parsed_post_vars: (MultiDict([('id', ''), ('url', 'https://mail.google.com/mail/u/0/#inbox/152ad1c1a956d462'), ('upload', ''), ('clear_upload', ''), ('name', 'fff'), ('description', ''), ('format', ''), ('save', 'go-metadata')]), <FakeCGIBody at 0x7ff5862ad710 viewing MultiDict([('id...a')])>) [Thu Feb 04 15:04:11.614953 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] webob._parsed_query_vars: (GET([]), '') [Thu Feb 04 15:04:11.615007 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] webob.adhoc_attrs: {'errors': 'ignore', 'response': <Response at 0x7ff587b55850 200 OK>, 'language': 'en-us'} [Thu Feb 04 15:04:11.615117 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] webob.is_body_readable: True [Thu Feb 04 15:04:11.615149 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] webob.is_body_seekable: False [Thu Feb 04 15:04:11.615189 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] wsgi process: 'Multi process AND threads (?)' [Thu Feb 04 15:04:11.615229 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] wsgi.file_wrapper: <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7ff587b890a8> [Thu Feb 04 15:04:11.615266 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] wsgiorg.routing_args: (<routes.util.URLGenerator object at 0x7ff5862ad2d0>, {'action': u'new_resource', 'controller': u'package', 'id': u'testeas'}) [Thu Feb 04 15:04:11.615299 2016] [:error] [pid 14423:tid 140692961957632] [remote 127.0.0.1:15018] ------------------------------------------------------------ [Thu Feb 04 15:04:11.689639 2016] [:error] [pid 14423:tid 140692961957632] 2016-02-04 15:04:11,689 INFO [ckan.lib.base] /dataset/new_resource/testeas render time 0.073 seconds [Thu Feb 04 15:04:12.183827 2016] [:error] [pid 14423:tid 140692878030592] 2016-02-04 15:04:12,183 INFO [ckan.lib.base] /api/i18n/en render time 0.002 seconds

drmalex07 commented 8 years ago

Cannot reproduce this problem on ckan 2.2.

Until we support newer ckan versions, i suggest that you try to re-use the CSW-related model and create it (on the target database) using plain sqlalchemy.