-
Notifications
You must be signed in to change notification settings - Fork 16
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
Error handling conflicts #100
Comments
I haven't been able to reproduce yet - I think the PostGIS instance that I'm using for testing seems to be more accepting of my inserting geometries with the wrong SRID than the PostGIS version you have. Nevertheless I can see the root cause of the bug in the code, so I'll have a fix out soon. If you don't want to wait until the next Kart patch-release for the fix, you could try the following workaround in the meantime: Workaround:
Sorry about the added complication! |
Duplicate of koordinates/kart#840 Moving issue to the koordinates/kart repository |
Missing the piece of code that adds SRIDs to features while writing them to the working copy, specifically during kart resolve. The Kart model doesn't store SRIDs per-row, so normal checkout operations add them in (at least for those working copies that do store them per row).
Thank you, will try that. |
Hello
I am a Kart new user, and just need your help.
So i have a repositorie that i cloned, postgis data, everything is working ok except one thing. When there is conflict and after i say KArt how to handle the conflict, when it tries to do the merge it always appears this error:
Traceback (most recent call last):
File "sqlalchemy\engine\base.py", line 1900, in _execute_context
File "sqlalchemy\engine\default.py", line 736, in do_execute
psycopg2.errors.InvalidParameterValue: Geometry SRID (0) does not match column SRID (3763)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "kart_cli.py", line 4, in
File "kart\cli.py", line 406, in entrypoint
File "click\core.py", line 1130, in call
File "click\core.py", line 1055, in main
File "kart\cli_util.py", line 72, in invoke
File "click\core.py", line 1657, in invoke
File "click\core.py", line 1404, in invoke
File "click\core.py", line 760, in invoke
File "click\decorators.py", line 26, in new_func
File "kart\resolve.py", line 583, in resolve
File "kart\resolve.py", line 284, in update_workingcopy_with_resolve
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.DataError: (psycopg2.errors.InvalidParameterValue) Geometry SRID (0) does not match column SRID (3763)
[SQL: INSERT INTO "Landbase_Topo".numeros_policia (fid, geom, id, numero_de_policia, numero_antigo, tipo_porta, denominacao_predio, verificado, observacoes, codigo_postal, rua_nome, local, freguesia, id_rua) VALUES (%(fid)s, %(geom)s, %(id)s, %(numero_de_policia)s, %(numero_antigo)s, %(tipo_porta)s, %(denominacao_predio)s, %(verificado)s, %(observacoes)s, %(codigo_postal)s, %(rua_nome)s, %(local)s, %(freguesia)s, %(id_rua)s) ON CONFLICT (fid) DO UPDATE SET geom = excluded.geom, id = excluded.id, numero_de_policia = excluded.numero_de_policia, numero_antigo = excluded.numero_antigo, tipo_porta = excluded.tipo_porta, denominacao_predio = excluded.denominacao_predio, verificado = excluded.verificado, observacoes = excluded.observacoes, codigo_postal = excluded.codigo_postal, rua_nome = excluded.rua_nome, local = excluded.local, freguesia = excluded.freguesia, id_rua = excluded.id_rua]
[parameters: {'fid': 17256, 'geom': , 'id': 1806793, 'numero_de_policia': '533', 'numero_antigo': '', 'tipo_porta': '', 'denominacao_predio': '', 'verificado': 'Não', 'observacoes': '', 'codigo_postal': '', 'rua_nome': 'Rua do Estabelecimento Prisional do Linhó', 'local': 'Linhó', 'freguesia': 'Alcabideche', 'id_rua': 1680385}]
(Background on this error at: https://sqlalche.me/e/14/9h9h)
[2208] Failed to execute script 'kart_cli' due to unhandled exception!
It happens with geopackage files, with Postgis data. I have checked all data and SRID´s are all ok EPSG:3763.
Any help i would be thankfull
Rui Teixeira
The text was updated successfully, but these errors were encountered: