-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TyperError: 'NoneType' on self.postgis_geometry_column = str(row['f_geometry_column']) #270
Comments
I run on postgre 10 and postgis 2.4 #select * from geometry_columns; and wkb_geometry comes from ckan_pycsw.py setup command CREATE TABLE "public"."Untitled" ( ALTER TABLE "public"."Untitled" CREATE INDEX "fts_gin_idx" ON "public"."Untitled" USING gin ( CREATE INDEX "ix_records_abstract" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_accessconstraints" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_bands" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_ckan_id" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_classification" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_cloudcover" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_conditionapplyingtoaccessanduse" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_contributor" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_couplingtype" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_creator" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_crs" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_date" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_date_creation" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_date_modified" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_date_publication" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_date_revision" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_degree" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_denominator" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_distanceuom" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_distancevalue" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_format" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_geodescode" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_insert_date" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_instrument" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_keywords" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_keywordstype" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_language" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_lineage" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_links" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_mdsource" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_operateson" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_operatesoname" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_operatesonidentifier" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_operation" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_organization" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_otherconstraints" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_parentidentifier" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_platform" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_publisher" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_relation" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_resourcelanguage" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_responsiblepartyrole" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_schema" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_securityconstraints" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_sensortype" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_servicetype" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_servicetypeversion" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_source" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_specificationdate" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_specificationdatetype" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_specificationtitle" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_time_begin" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_time_end" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_title" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_title_alternate" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_topicategory" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_type" ON "public"."Untitled" USING btree ( CREATE INDEX "ix_records_typename" ON "public"."Untitled" USING btree ( CREATE INDEX "wkb_geometry_idx" ON "public"."Untitled" USING gist ( CREATE TRIGGER "ftsupdate" BEFORE INSERT OR UPDATE ON "public"."Untitled" CREATE TRIGGER "records_update_geometry" BEFORE INSERT OR UPDATE ON "public"."Untitled" |
I was run this command inside activated environtment py3:
inside directory : /usr/lib/ckan/default/src/ckanext-spatial
$python bin/ckan_pycsw.py load -p /etc/ckan/default/pycsw.cfg -u https://blablabla.org
got response:
bin/ckan_pycsw.py:248: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
config = SafeConfigParser()
creating new engine: postgresql://user:[email protected]/ckan_default
binding ORM to existing database
PostgreSQL+PostGIS+Native not picked up: records
Traceback (most recent call last):
File "/usr/lib/ckan/default/lib/python3.8/site-packages/pycsw-3.0.dev0-py3.8.egg/pycsw/core/repository.py", line 160, in init
self.postgis_geometry_column = str(row['f_geometry_column'])
TypeError: 'NoneType' object is not subscriptable
setting repository queryables
Started gathering CKAN datasets identifiers: 2021-12-28 12:53:36.181253
Gather finished (0 datasets): 2021-12-28 12:53:36.206973
---------------- >>>> Please what is the problem? <<<<-----------------------
I found this on line 78 (i do some adjustmen to the query)
====================/usr/lib/ckan/default/src/ckanext-spatial/bin/ckan_pycsw.py =====================
query = 'api/3/action/datastore_search?q={"fl":"id,metadata_modified,extras_harvest_object_id,extras_metadata_source", "q":"harvest_object_id:[\"\" TO *]", "limit":1000, "start":%s}'
#query = 'api/3/action/datastore_search?resource_id=_table_metadata'
#query = 'api/3/action/package_search?json={"fl":"id,metadata_modified,extras_harvest_object_id,extras_metadata_source", "q":"harvest_object_id:[\"\" TO *]", "limit":1000, "start":%s}'
#query = 'api/search/dataset?qjson={"fl":"id,metadata_modified,extras_harvest_object_id,extras_metadata_source", "q":"harvest_object_id:[\"\" TO *]", "limit":1000, "start":%s}'
=================================== @smellman @morty @kindly
and another try after delete table
records
and repeat setup command$python bin/ckan_pycsw.py setup -p /etc/ckan/default/pycsw.cfg
then load command
$python bin/ckan_pycsw.py load -p /etc/ckan/default/pycsw.cfg -u https://blablabla.org
gets this:
/usr/lib/ckan/default/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/base.py:3233: SAWarning: Did not recognize type 'geometry' of column 'wkb_geometry'
util.warn(
setting repository queryables
Started gathering CKAN datasets identifiers: 2021-12-28 13:57:13.090627
Gather finished (0 datasets): 2021-12-28 13:57:13.116979
The text was updated successfully, but these errors were encountered: