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

Python warnings #110

Open
marioba opened this issue Dec 3, 2019 · 3 comments
Open

Python warnings #110

marioba opened this issue Dec 3, 2019 · 3 comments

Comments

@marioba
Copy link
Contributor

marioba commented Dec 3, 2019

Avec la LTR, python donne ces 3 warning concernant OpenComptages :

  1. warning:C:\apps\OSGEO4~1\apps\Python37\lib\site-packages\requests_init_.py:91: RequestsDependencyWarning: urllib3 (1.25.6) or chardet (3.0.4) doesn't match a supported version!

  2. Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

  3. inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()

Avec la version 3.10.0 il y a ce message qui apparaît
image
est-ce normal ? est-ce que tout fonctionne quand même correctement ?

@marioba
Copy link
Contributor Author

marioba commented Dec 10, 2019

Pour les macros, il est tout à fait normal que QGIS demande si tu veut les exécuter. Dans les options de QGIS il est possible de modifier ce comportement .

@spch-GL
Copy link
Contributor

spch-GL commented Dec 9, 2020

Avec Qgis 3.10.12 et le plug-in 0.7.6b (24.05.2020) les 3 warnings ci-dessus ont disparu. Par contre la connexion à la base provoque:

  1. ces Warnings PostGIS:
2020-12-09T08:39:54     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='installation' AND f_geometry_column ='geometry' ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:54     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='section' AND f_geometry_column ='geometry' ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:54     WARNING    ATTENTION: row number 0 is out of range 0..-1
2020-12-09T08:39:54     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='lane' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:54     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='count' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:54     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='model' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:54     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='device' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:54     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='sensor_type' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='class' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='damage_log' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='brand' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='category' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='special_period' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='installation' AND f_geometry_column ='geometry' ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='section' AND f_geometry_column ='geometry' ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='lane' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='count' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='model' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='device' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='sensor_type' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='class' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='damage_log' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='brand' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='category' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
2020-12-09T08:39:55     WARNING    Requête erronée : SELECT styleQML FROM layer_styles WHERE f_table_catalog='spch' AND f_table_schema='comptages' AND f_table_name='special_period' AND f_geometry_column IS NULL ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 a retourné 7 [ERREUR: droit refusé pour la relation layer_styles
             ]
  1. ce Warning Avertissement Python
2020-12-09T08:39:54     WARNING    warning:C:/Users/GrelletP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\comptages\core\layers.py:198: DeprecationWarning: QgsCoordinateReferenceSystem constructor is deprecated
              crs = QgsCoordinateReferenceSystem(epsg)
             
             traceback: File "C:/Users/GrelletP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\comptages\comptages.py", line 167, in do_connect_db_action
              self.layers.load_layers()
              File "C:/Users/GrelletP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\comptages\core\layers.py", line 56, in load_layers
              layer_definition['epsg'],
              File "C:/Users/GrelletP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\comptages\core\layers.py", line 198, in load_layer
              crs = QgsCoordinateReferenceSystem(epsg)

@spch-GL
Copy link
Contributor

spch-GL commented Dec 9, 2020

Il y a les mêmes Warnings sous QGIS 3.16.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants