ckan / ckan/ckanext-spatial

PyCSW ConfigParser.get has wrong number of arguments

Open
#326 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
XSLT
Stars
136
Forks
207
PR merge metrics
No merged PRs in 30d

Description

In `ckan_pycsw.py` there is a `TypeError` raised when various references to `table_name = pycsw_config.get("repository", "table", "records")` is called, indicating a maximum of 3 arguments, with 4 supplied, e.g.

https://github.com/ckan/ckanext-spatial/blob/master/bin/ckan_pycsw.py#L27

According to https://docs.python.org/3/library/configparser.html#fallback-values there is a keyword-only `fallback` argument, which looks to be the possible intended behavior here? Should this be

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in bin/ckan_pycsw.py at the table_name assignment and inspect how repository configuration is read through ConfigParser.get. Confirm the expected fallback behavior from Python's ConfigParser documentation, then exercise the ckan_pycsw entry point with the relevant configuration. Done means the command no longer raises the argument-count TypeError and resolves the table name as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.