Skip to content
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

Unexpected behaviour in kart add-dataset @ postgis #965

Closed
FelixEickeler opened this issue Feb 6, 2024 · 0 comments · Fixed by #967
Closed

Unexpected behaviour in kart add-dataset @ postgis #965

FelixEickeler opened this issue Feb 6, 2024 · 0 comments · Fixed by #967
Assignees

Comments

@FelixEickeler
Copy link

Describe the bug
When executing add-dataset on a table in a postgres working copy a ProgrammingError is thrown.

To Reproduce
Steps to reproduce the behaviour:

  1. kart init --workingcopy postgresql://user:password@host:5432/database/schema --import ... (an actually empty gpkg)
  2. Create a new table in the schema (f.e. with QGIS)
  3. kart status --list-untracked-tables (interestingly this shows also the tracked table)
  4. kart add-dataset shown name with schema (testet alternatives without => not found | postgres URI => not found)
  5. See error

Expected behaviour
This works as expected when using geopackages. New tables can be added via add-dataset command.

Output
Traceback (most recent call last):
File "kart_cli.py", line 4, in
File "kart\cli.py", line 404, in entrypoint
File "click\core.py", line 1157, in call
File "click\core.py", line 1078, in main
File "kart\cli_util.py", line 72, in invoke
File "click\core.py", line 1688, in invoke
File "click\core.py", line 1434, in invoke
File "click\core.py", line 783, in invoke
File "click\decorators.py", line 34, in new_func
File "kart\add_dataset.py", line 71, in add_dataset
File "kart\tabular\working_copy\base.py", line 639, in meta_items
File "kart\sqlalchemy\adapter\base.py", line 148, in all_v2_meta_items
File "kart\utils.py", line 25, in wrapper
File "kart\sqlalchemy\adapter\postgis.py", line 137, in all_v2_meta_items_including_empty
File "sqlalchemy\orm\session.py", line 1744, in scalar
File "sqlalchemy\orm\session.py", line 1714, in execute
File "sqlalchemy\engine\base.py", line 1705, in _execute_20
File "sqlalchemy\sql\elements.py", line 334, in _execute_on_connection
File "sqlalchemy\engine\base.py", line 1572, in _execute_clauseelement
File "sqlalchemy\engine\base.py", line 1943, in _execute_context
File "sqlalchemy\engine\base.py", line 2124, in handle_dbapi_exception
File "sqlalchemy\util\compat.py", line 211, in raise

File "sqlalchemy\engine\base.py", line 1900, in _execute_context
File "sqlalchemy\engine\default.py", line 736, in do_execute
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "we.we.is_this_tracked" does not exist
LINE 1: SELECT obj_description(('we."we.is_this_tracked"')::regclass...

**Version Info **

  • OS: Windows 10/11
  • Version: 0.14.2 0.15.0 installed from the provided binaries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants