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

fe_sendauth: no password supplied #505

Open
Kay-Korrodi opened this issue Dec 3, 2024 · 33 comments
Open

fe_sendauth: no password supplied #505

Kay-Korrodi opened this issue Dec 3, 2024 · 33 comments
Labels
bug Something isn't working critical documentation Improvements or additions to documentation

Comments

@Kay-Korrodi
Copy link

Kay-Korrodi commented Dec 3, 2024

Describe the bug
On exporting INTERLIS I get the following authentication error

To Reproduce
Exact steps to reproduce the behavior:

  1. Go to 'INTERLIS export'
  2. Select 'SIA405 Abwasser 2020.1'
  3. Click on export
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Also with database on server pg_conf setting should be read correctly

Screenshots / data
Ein Fehler trat bei der Ausführung von Python-Code auf:
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
Traceback (most recent call last):
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 619, in actionExportClicked
self.interlisImporterExporter.action_export()
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 149, in action_export
raise exception
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 119, in action_export
self.interlis_importer_exporter.interlis_export(
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 168, in interlis_export
self._check_subclass_counts(limit_to_selection)
File "C:\Users/xxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 488, in _check_subclass_counts
self._check_subclass_count(
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 563, in check_subclass_count
with DatabaseUtils.PsycopgConnection() as connection:
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\utils\database_utils.py", line 39, in enter
self.connection = psycopg.connect(
^^^^^^^^^^^^^^^^
File "C:\Users\xxx\AppData\Roaming\Python\Python312\site-packages\psycopg2_init
.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied

Python-Version: 3.12.4 (main, Jun 10 2024, 12:48:35) [MSC v.1938 64 bit (AMD64)]
QGIS-Version: 3.34.8-Prizren Prizren, 91642333
Python-Pfad:
• C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\generate_swmm_inp
• C:/PROGRA1/QGIS331.8/apps/qgis-ltr/./python
• C:/Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python
• C:/Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
• C:/PROGRA1/QGIS331.8/apps/qgis-ltr/./python/plugins
• C:\PROGRA1\QGIS331.8\apps\grass\grass83\etc\python
• C:\Users\Default\Documents
• C:\Program Files\QGIS 3.34.8\bin\python312.zip
• C:\PROGRA1\QGIS331.8\apps\Python312\DLLs
• C:\PROGRA1\QGIS331.8\apps\Python312\Lib
• C:\Program Files\QGIS 3.34.8\bin
• C:\Users\xxx\AppData\Roaming\Python\Python312\site-packages
• C:\PROGRA1\QGIS331.8\apps\Python312
• C:\PROGRA1\QGIS331.8\apps\Python312\Lib\site-packages
• C:\PROGRA1\QGIS331.8\apps\Python312\Lib\site-packages\win32
• C:\PROGRA1\QGIS331.8\apps\Python312\Lib\site-packages\win32\lib
• C:\PROGRA1\QGIS331.8\apps\Python312\Lib\site-packages\Pythonwin
• C:/Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python
• X:/QGIS/TWW/project-translations
• C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui....

Desktop (please complete the following information):

  • TWW version 2024.0.4
  • QGIS Version 3.34.8
  • OS Win 11

Additional context
Add any other context about the problem here.

@sjib sjib added the bug Something isn't working label Dec 3, 2024
@sjib sjib added this to the TEKSI Wastewater 2024.0 milestone Dec 3, 2024
@sjib
Copy link
Contributor

sjib commented Dec 3, 2024 via email

@ponceta
Copy link
Member

ponceta commented Dec 4, 2024

Is your tww project opening correctly?

Could you check your pg_tww settings configuration? Is there a password provided in your pg_service file?

@Kay-Korrodi
Copy link
Author

Kay-Korrodi commented Dec 4, 2024

Thanks for your feedback.

Stefan and i tried it together yes my project is correctly

pg_service is also working well with pw and stuff like that

we have a cloud server and somehow it goes over the localhost as you can see in the log i posted yesterday.

i hope my answer helps

@Kay-Korrodi
Copy link
Author

Kay-Korrodi commented Dec 4, 2024

Good News
With the Teksi Plugin from 01.11.24 i can make xtf's so i think the new version of the plugin does not work anymore....
Also de phyton errors about the reach_points is somehow with this version gone...

@Kay-Korrodi
Copy link
Author

Sad News
Another Person that i know installed the latest Plugin from github and had the same error as i had. So it is not only on my computer. Maybe this helps to find the bug.

@ponceta
Copy link
Member

ponceta commented Dec 10, 2024

  • Is your password in the pg file? In a pg pass?
  • could you try defining the host as 127.0.0.1 instead of localhost?

@Kay-Korrodi
Copy link
Author

our pgpass file is filled with the ip off our server and the dbases from there
i cant change the localhost because i dont have one in my pgpass we have there our ip from our server i can send you my pgpass via mail if needed
as i wrote befor if i us an older teksi plugin it works. so it must be new version of the plugin

@cymed
Copy link
Contributor

cymed commented Dec 16, 2024

I suppose that error is linked with #430
In order to allow using sslparams, we now pass all pgconf params in

def get_pgconf_as_psycopg_dsn() -> List[str]:

Change from 5cdd61e

@sjib
Copy link
Contributor

sjib commented Dec 19, 2024

@ponceta @cymed Looks like a critical error - how can we fix this for release 2024.0

@sjib sjib added the critical label Dec 19, 2024
@cymed
Copy link
Contributor

cymed commented Dec 19, 2024

The error is not thrown during the export itself, but while validating the subclass count before exporting. Thus, the problem lies in TEKSI Wastewater (although it is possible that ili2pg has issues too)

@Kay-Korrodi

  1. Which prereleases (use the official enumeration) worked, which did not?
  2. How your pg_service.conf structured? (no need to pass the values, structure is enough)
  3. Do you run QGIS Desktop on a remote server or locally?
  4. If you are working on a remote server: Where is python running (cloud or local)?

@Kay-Korrodi
Copy link
Author

Kay-Korrodi commented Dec 19, 2024

  1. the current did not work the one we use is dated on 01.11.24 i dont know wich version it is i can send it to you if needed
  2. _# zermatt_prod 🦣☁️
    [zermatt_prod]
    host=xxx.xxx.xxx.xx
    port=xxxx
    dbname=xxx
    user=postgres
    password=xxx

Its just one from a list of our server connections and they are clean and make no problem with the old modul

  1. locally
  2. no remot server

i know a company trying tww and they had the same problem i sent em the older version (the one we use from point 1) of the teksi modul and it works there too so it cant be my configuration...

@cymed
Copy link
Contributor

cymed commented Dec 19, 2024

@Kay-Korrodi can you apply the changes in #511 and set the logging level to 'debug'? Best case we log the connection it creates for you.

@ponceta
Copy link
Member

ponceta commented Dec 20, 2024

I integrated it to https://github.com/teksi/wastewater/releases/tag/2024.0.5 so you can test everything with the latest version directly.

@sjib
Copy link
Contributor

sjib commented Dec 20, 2024

Documentation see #511 (comment)

@sjib sjib added the documentation Improvements or additions to documentation label Dec 20, 2024
@Kay-Korrodi
Copy link
Author

Good Morning my Friends from TEKSI

We gave 2024.0.5 a try on our brand new server. i just want to inform you, that we still get the localhost error. Do you think we get a fix in the next time 👍 it is now difficult to make exports, because a lot changed till the last working version...

@cymed
Copy link
Contributor

cymed commented Jan 29, 2025

Did you create a debug log for us? If no - in the TWW settings, go to "Developer options", set the log level to "Debug" and log to a file

@taetscher
Copy link

On request of @Kay-Korrodi , here is the logfile with logging-level debug:
tww_zermatt_debug.log

I did some digging myself and found out that here the read_pgservice method is expecting a value that is never actually assigned.

Figuring this might be the reason for the absence of a log of my service definition in the logfile, I hardcoded the name of my service definition as the Attribute PGSERVICE of the class DatabaseConfig.

That seemed to do the trick - so maybe this should not be None by default?
I lack knowledge of the rest of the interface, so I was not able to think up a solution. But hopefully the analysis is useful in some way?

@Kay-Korrodi
Copy link
Author

@taetscher Thank you for the log. I look forward to the working tool 😄

@cymed
Copy link
Contributor

cymed commented Jan 31, 2025

The pg_service is loaded on https://github.com/teksi/wastewater/blob/main/plugin/teksi_wastewater/teksi_wastewater_plugin.py#L672-L689

@sjib
Copy link
Contributor

sjib commented Feb 11, 2025

@sjib to check with Zermatt whether it is solved or not

@cymed
Copy link
Contributor

cymed commented Feb 12, 2025

Going through the log of @taetscher I see the following:

Next steps:

  • Check if there is a misnomer in the tww project (QGIS Layer id of vw_tww_wastewater_structure)
  • add a debug point to onLayersAvailable

@sjib
Copy link
Contributor

sjib commented Feb 13, 2025

@taetscher @Kay-Korrodi
At startup of the project this should be logged in the tww tab:

2025-02-13T10:20:18        teksi_wastewater:TEKSI Wastewater plugin version 2024.0.5 started
2025-02-13T10:20:18        teksi_wastewater.utils.translation:Using system default locale: de_CH
2025-02-13T10:21:04        teksi_wastewater.utils:Checking setup of oid prefix
2025-02-13T10:21:04        teksi_wastewater.utils:PGSYSCONFDIR: C:\..\..\pgconf\pg_service.conf
2025-02-13T10:21:04        teksi_wastewater.utils:psycopg dsn: host=localhost port=5433 dbname=tww user=xxx password=[PASSWORD]
2025-02-13T10:21:04        teksi_wastewater.utils:Checking setup of default_values
2025-02-13T10:21:04        teksi_wastewater.utils:PGSYSCONFDIR: C:\..\..\pgconf\pg_service.conf
2025-02-13T10:21:04        teksi_wastewater.utils:psycopg dsn: host=localhost port=5433 dbname=tww user=xxx password=[PASSWORD]
2025-02-13T10:21:04        teksi_wastewater.utils:Check symbology triggers enabled
2025-02-13T10:21:04        teksi_wastewater.utils:PGSYSCONFDIR: C:\..\..\pgconf\pg_service.conf
2025-02-13T10:21:04        teksi_wastewater.utils:psycopg dsn: host=localhost port=5433 dbname=tww user=xxx password=[PASSWORD]

Does this work correctly?

And this should be logged while exporting to INTERLIS:

2025-02-13T10:27:38        teksi_wastewater.utils:INTEGRITY CHECK wastewater_networkelement subclass data...
2025-02-13T10:27:38        teksi_wastewater.utils:CONNECTING TO DATABASE...
2025-02-13T10:27:38        teksi_wastewater.utils:PGSYSCONFDIR: C:\..\..\pgconf\pg_service.conf
2025-02-13T10:27:38        teksi_wastewater.utils:psycopg dsn: host=localhost port=5433 dbname=tww user=xxx password=[PASSWORD]
2025-02-13T10:27:38        teksi_wastewater.utils:Number of wastewater_networkelement datasets: 55581
2025-02-13T10:27:38        teksi_wastewater.utils:Number of reach datasets: 32995
2025-02-13T10:27:38        teksi_wastewater.utils:Number of wastewater_node datasets: 22586
2025-02-13T10:27:38        teksi_wastewater.utils:OK: number of subclass elements of class wastewater_networkelement OK in schema tww_od!
2025-02-13T10:27:38        teksi_wastewater.utils:INTEGRITY CHECK wastewater_structure subclass data...
etc.

I don't see any line that references to pg_service.conf in your log. Did you set that path?
Documentation how to setup see
Windows: https://teksi.github.io/wastewater/installation-guide/workstation.html#windows-pg-service
Linux/MacOS: https://teksi.github.io/wastewater/installation-guide/workstation.html#linux-macos-pg-service

@Kay-Korrodi
Copy link
Author

Thanks for your Message. on 19th Dezember i answered that the pg_service.conf is set. i know at least another company not only Zermatt and Ryser that get this error. And i know all have set the pg_service.conf.... especially because i set it up for that company and when they swap to the old version i use they dont have that error anymore. i am 100% sure that it is the tool and not the setup of our computers....
maybe @taetscher can send the log to you i only run the old version of the tool. Because that version runs perfectly fine😄

@taetscher
Copy link

@sjib
Wherever it says {redacted :)}, I went ahead and left out some semi-sensitive information. I did however, make sure that the information in the original logs checks out.

On startup I get

2025-02-13T12:46:10        teksi_wastewater:TEKSI Wastewater plugin version 2024.0.5 started
2025-02-13T12:46:10        teksi_wastewater.utils.translation:Using QGIS override locale: en_US

in the log messages tww-tab

On export to INTERLIS I get

2025-02-13T12:53:17        teksi_wastewater.utils:INTEGRITY CHECK wastewater_networkelement subclass data...
2025-02-13T12:53:17        teksi_wastewater.utils:CONNECTING TO DATABASE...
2025-02-13T12:53:17        teksi_wastewater.utils:psycopg dsn: 

as well as

This psycopg2 error
2025-02-13T12:53:21     WARNING    Traceback (most recent call last):
            File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 630, in actionExportClicked
            self.interlisImporterExporter.action_export()
            File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 149, in action_export
            raise exception
            File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 119, in action_export
            self.interlis_importer_exporter.interlis_export(
            File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 168, in interlis_export
            self._check_subclass_counts(limit_to_selection)
            File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 488, in _check_subclass_counts
            self._check_subclass_count(
            File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 563, in _check_subclass_count
            with DatabaseUtils.PsycopgConnection() as connection:
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\utils\database_utils.py", line 40, in __enter__
            self.connection = psycopg.connect(
            ^^^^^^^^^^^^^^^^
            File "{redacted :)}\AppData\Roaming\Python\Python312\site-packages\psycopg2\__init__.py", line 122, in connect
            conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           psycopg2.OperationalError: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061)
            Is the server running on that host and accepting TCP/IP connections?
           connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061)
            Is the server running on that host and accepting TCP/IP connections?

In the python log messages tab.

However, the server I am trying to connect to is not running on localhost. Connecting to the remote instance via QGIS and PgAdmin works just fine (using the service-definition), which means the server is reachable by our system. It's just the INTERLIS-Export that seems to get the impression that the connection is pointing to a localhost somehow.

Only when i hardcode the PGSERVICE Attribute of the DatabaseConfig Class to the name of my service definition, do I get the

same log messages as you do and the export works (taken from the logfile so I didn't have to wait for the export to finish).
2025-02-13 12:48:14,558:INFO:plugin_utils:INTEGRITY CHECK wastewater_networkelement subclass data...
2025-02-13 12:48:14,559:INFO:plugin_utils:CONNECTING TO DATABASE...
2025-02-13 12:48:14,560:DEBUG:plugin_utils:PGSYSCONFDIR:  {redacted :)}\custom_env_variables_BES\postgres\pg_service.conf
2025-02-13 12:48:14,562:DEBUG:plugin_utils:psycopg dsn: host={redacted :)} port=5432 dbname={redacted :)} user={redacted :)} password=[PASSWORD]
2025-02-13 12:48:14,727:INFO:plugin_utils:Number of wastewater_networkelement datasets: 7857
2025-02-13 12:48:14,747:INFO:plugin_utils:Number of reach datasets: 4959
2025-02-13 12:48:14,765:INFO:plugin_utils:Number of wastewater_node datasets: 2898
2025-02-13 12:48:14,766:INFO:plugin_utils:OK: number of subclass elements of class wastewater_networkelement OK in schema tww_od!
2025-02-13 12:48:14,768:INFO:plugin_utils:INTEGRITY CHECK wastewater_structure subclass data...
...

env-var is set, pointing to the directory where my pg_service.conf file is located:

Image

@cymed
Copy link
Contributor

cymed commented Feb 14, 2025

@taetscher The plugin ought to load the service from the layer definition of vw_tww_wastewater_structure. Can you verify that there is no (ghost) layer with another datasource in the project?

@taetscher
Copy link

@cymed I checked, did not find any "ghost" layer. There are, however, some layers within the project that use different service-defs (getting tables from different databases).

@cymed
Copy link
Contributor

cymed commented Feb 19, 2025

@taetscher does the additional log in #548 return a postgres layer?

@taetscher
Copy link

@cymed No, not as far as I understand. The only lines logged upon opening of the tww QGIS-Project 1 are:

2025-02-19 15:37:03,865:INFO:plugin_utils:TEKSI Wastewater plugin version 0.0.0 started
2025-02-19 15:37:03,868:INFO:plugin_utils:Using QGIS override locale: en_US

Footnotes

  1. I used the asset from https://github.com/teksi/wastewater/actions/runs/13385089964 and installed this as my plugin version. I hope this is what I was supposed to do?

@taetscher
Copy link

@cymed

I also tested using the current .qgs file - to no avail.
Then I tried disabling/re-enabling the TEKSI-Plugin in QGIS Plugin Manager.

This yielded an interesting error-message (one that I think I saw a couple of times before - sometimes it would show up, sometimes, it wouldn't):

ValueError: No Point Geometry found for Node ch19qnvg1kA1FnTa (Type: reach_point) 
Traceback (most recent call last):
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 112, in _addVertices
    vertex = feat.geometry().asPoint()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Null geometry cannot be converted to a point.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 457, in onLayersAvailable
    self.network_analyzer.setNodeLayer(layers["vw_network_node"])
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 94, in setNodeLayer
    self.createGraph()
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 219, in createGraph
    self._addVertices()
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 114, in _addVertices
    raise ValueError(f"No Point Geometry found for Node {obj_id} (Type: {obj_type})")
ValueError: No Point Geometry found for Node ch19qnvg1kA1FnTa (Type: reach_point)

What I find rather odd is that:

SELECT * FROM tww_od.reach_point
WHERE situation3d_geometry IS NULL
ORDER BY obj_id ASC 

Yields nothing, there are no reach points that are missing a geometry...

I somehow doubt this has anything to do with this issue, though.

@cymed
Copy link
Contributor

cymed commented Feb 21, 2025

@cymed

I also tested using the current .qgs file - to no avail.
Then I tried disabling/re-enabling the TEKSI-Plugin in QGIS Plugin Manager.

This yielded an interesting error-message (one that I think I saw a couple of times before - sometimes it would show up, sometimes, it wouldn't):

ValueError: No Point Geometry found for Node ch19qnvg1kA1FnTa (Type: reach_point) 
Traceback (most recent call last):
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 112, in _addVertices
    vertex = feat.geometry().asPoint()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Null geometry cannot be converted to a point.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 457, in onLayersAvailable
    self.network_analyzer.setNodeLayer(layers["vw_network_node"])
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 94, in setNodeLayer
    self.createGraph()
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 219, in createGraph
    self._addVertices()
  File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 114, in _addVertices
    raise ValueError(f"No Point Geometry found for Node {obj_id} (Type: {obj_type})")
ValueError: No Point Geometry found for Node ch19qnvg1kA1FnTa (Type: reach_point)

What I find rather odd is that:

SELECT * FROM tww_od.reach_point
WHERE situation3d_geometry IS NULL
ORDER BY obj_id ASC 

Yields nothing, there are no reach points that are missing a geometry...

I somehow doubt this has anything to do with this issue, though.

setNodeLayer is fired in the same function that fires loading the connection data from vw_tww_wastewater_structure, so there might be a connection.

vw_network_node is a materialized view, so there could be a NULL geometry that's fixed in the meantime

@taetscher
Copy link

@cymed

setNodeLayer is fired in the same function that fires loading the connection data from vw_tww_wastewater_structure, so there might be a connection.

I see.
Interesting thing about this: I could swear I did not get this error every time I loaded the qgis project...? But that could also be observer bias.

vw_network_node is a materialized view, so there could be a NULL geometry that's fixed in the meantime

Bingo!
After manually refreshing the matview, I now get the following logged:

2025-02-21T07:54:05        teksi_wastewater:TEKSI Wastewater plugin version 0.0.0 started
2025-02-21T07:54:05        teksi_wastewater.utils.translation:Using QGIS override locale: en_US
2025-02-21T07:54:37        teksi_wastewater:dataprovider of vw_tww_wastewater_structure: 
2025-02-21T07:54:37        teksi_wastewater.utils:Checking setup of oid prefix
2025-02-21T07:54:37        teksi_wastewater.utils:PGSYSCONFDIR: {redacted :)}\custom_env_variables_BES\postgres\pg_service.conf
2025-02-21T07:54:37        teksi_wastewater.utils:psycopg dsn: host={redacted :)} port=5432 dbname={redacted :)} user={redacted :)} password=[PASSWORD]
2025-02-21T07:54:37        teksi_wastewater.utils:Checking setup of default_values
2025-02-21T07:54:37        teksi_wastewater.utils:PGSYSCONFDIR: {redacted :)}\custom_env_variables_BES\postgres\pg_service.conf
2025-02-21T07:54:37        teksi_wastewater.utils:psycopg dsn: host={redacted :)} port=5432 dbname={redacted :)} user={redacted :)} password=[PASSWORD]
2025-02-21T07:54:37        teksi_wastewater.utils:Check symbology triggers enabled
2025-02-21T07:54:37        teksi_wastewater.utils:PGSYSCONFDIR: {redacted :)}\custom_env_variables_BES\postgres\pg_service.conf
2025-02-21T07:54:37        teksi_wastewater.utils:psycopg dsn: host={redacted :)} port=5432 dbname={redacted :)} user={redacted :)} password=[PASSWORD]

The INTERLIS-Export now also knows where to look for the data.
Thanks a lot for your support!

@Kay-Korrodi FYI

@sjib
Copy link
Contributor

sjib commented Feb 21, 2025

So what is the conclusion of all these findings?

  • Should we add a refreshing of the materialized views before running INTERLIS export?
  • any other suggestions?

@cymed
Copy link
Contributor

cymed commented Feb 21, 2025

My conclusion is to check the tww layers separately from the network views to ensure we get the correct pg_service even if the materialized views have problems. See. #551

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants