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

Erreur lors de l'installation #53

Open
Beachloft opened this issue Sep 29, 2024 · 16 comments
Open

Erreur lors de l'installation #53

Beachloft opened this issue Sep 29, 2024 · 16 comments

Comments

@Beachloft
Copy link

Bonjour,
Suite à l'installation de Gazpar sur HA, j'ai ce message d'erreur sur le sensor qui a été créé.
J'ai fait une boulette mais ou ?

Failed to query PyGazpar library. The exception has been raised: list indices must be integers or slices, not str

Merci de votre aide.

Olivier

@ssenart
Copy link
Owner

ssenart commented Sep 29, 2024

Bonjour,

Le message n'est pas complet. Il doit y avoir des lignes de code (stracktrace) avant et/ou après.

Pourrais-tu les donner ?

@Beachloft
Copy link
Author

Merci de ton retour, mais ou le trouver, je n'ai que ça. Je pense que je ne cherche pas au bon endroit
2024_09_29_19_59_45_Outils_de_développement_Home_Assistant

@ssenart
Copy link
Owner

ssenart commented Sep 29, 2024

Dans le fichier de log home-assistant.log, il devrait y avoir plus de détails.

@Beachloft
Copy link
Author

Beachloft commented Sep 29, 2024

Cette erreur provient d'une intégration personnalisée

Enregistreur: custom_components.gazpar.sensor
Source: custom_components/gazpar/sensor.py:147
intégration: gazpar (documentation, problèmes)
S'est produit pour la première fois: 17:45:59 (1 occurrences)
Dernier enregistrement: 17:45:59

Failed to query PyGazpar library. The exception has been raised: Traceback (most recent call last): File "/config/custom_components/gazpar/sensor.py", line 138, in update_gazpar_data self._dataByFrequency = client.loadSince(self._pceIdentifier, 1095) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pygazpar/client.py", line 39, in loadSince res = self.loadDateRange(pceIdentifier, startDate, endDate, frequencies) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pygazpar/client.py", line 52, in loadDateRange res = self.__dataSource.load(pceIdentifier, startDate, endDate, frequencies) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pygazpar/datasource.py", line 64, in load res = self._loadFromSession(auth_token, pceIdentifier, startDate, endDate, frequencies) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pygazpar/datasource.py", line 327, in _loadFromSession daily = JsonParser.parse(data, temperatures, pceIdentifier) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pygazpar/jsonparser.py", line 30, in parse for releve in data[pceIdentifier]['releves']: ~~~~^^^^^^^^^^^^^^^ TypeError: list indices must be integers or slices, not str

Enregistreur: homeassistant.util.loop
Source: util/loop.py:136
S'est produit pour la première fois: 17:45:52 (1 occurrences)
Dernier enregistrement: 17:45:52

Detected blocking call to open with args ('/config/custom_components/gazpar/manifest.json',) inside the event loop by custom integration 'gazpar' at custom_components/gazpar/manifest.py, line 14: with open(manifestFilePath) as jsonFile: (offender: /config/custom_components/gazpar/manifest.py, line 14: with open(manifestFilePath) as jsonFile:), please create a bug report at https://github.com/ssenart/ha-custom_components/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 909, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state self.__async_calculate_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1071, in __async_calculate_state if extra_state_attributes := self.extra_state_attributes: File "/config/custom_components/gazpar/sensor.py", line 236, in extra_state_attributes return Util.toAttributes(self._account.username, self._account.pceIdentifier, self._dataByFrequency, self._account.errorMessages) File "/config/custom_components/gazpar/util.py", line 57, in toAttributes ATTR_VERSION: Manifest.version(), File "/config/custom_components/gazpar/manifest.py", line 14, in version with open(manifestFilePath) as jsonFile:

@ssenart
Copy link
Owner

ssenart commented Sep 29, 2024

Bien, il y a du détail. Notamment le message:

/usr/local/lib/python3.12/site-packages/pygazpar/jsonparser.py", line 30, in parse for releve in data[pceIdentifier]['releves']: ~~~~^^^^^^^^^^^^^^^ TypeError: list indices must be integers or slices, not str

qui pourrait venir parce qu'il n'y a pas de données. Est-ce le cas ? Voyez-vous vos données actualisées sur le site de GrDF ?

@Beachloft
Copy link
Author

J'ai des données jusqu'au 18/09, et pas après, étrange.
Tu sais d'où cela pourrait provenir ? Le problème vient de là ,,non ?
image

@ssenart
Copy link
Owner

ssenart commented Sep 29, 2024

Il faut plutôt aller voir dans "Maîtriser ma consommation" et afficher les données en "Jour" pour voir la dernière mise à jour.

Il y a aussi un bouton "Télécharger" pour récupérer l'historique journalier dans une feuille Excel.

Est-ce que la feuille Excel est bien remplie et jusqu'à une date récente ?

@Beachloft
Copy link
Author

J'ai des données jusqu'au 27/09. Par contre j'ai un message d'erreur lorsque je veux télécharger le fichier excel
image

@enthalpie91
Copy link

bonjour
je me greffe sur ce sujet. j'ai le même message d'erreur , mais je pense que je n'arrive pas à me connecter sur mon espace. mon Mdp contient @

@enthalpie91
Copy link

re bonjour
je confirme que c'était bien un souci de mdp
Screenshot_20240930_110435

@Beachloft
Copy link
Author

Beachloft commented Oct 2, 2024

Bonjour,
sur la réponse de @enthalpie91 j'ai vu qu'il n'y avait pas d'espace sur le N° de PCE, j'ai donc supprimé les espaces et fait la mise à jour que tu as mise à disposition. Maintenant j'ai des données qui remontent mais de façon irrégulières, il y a un paramétrage complémentaire à réaliser ?
Merci déjà pour l'aide, ça me permet d'avancer !!

image

Hourly
Daily

  • time_period: 29/09/2024
    start_index_m3: 1486
    end_index_m3: 1487
    volume_m3: 1.35
    energy_kwh: 15
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 28/09/2024
    start_index_m3: 1485
    end_index_m3: 1486
    volume_m3: 0.71
    energy_kwh: 8
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 27/09/2024
    start_index_m3: 1484
    end_index_m3: 1485
    volume_m3: 0.53
    energy_kwh: 6
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 26/09/2024
    start_index_m3: 1484
    end_index_m3: 1484
    volume_m3: 0.59
    energy_kwh: 7
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 25/09/2024
    start_index_m3: 1483
    end_index_m3: 1484
    volume_m3: 0.64
    energy_kwh: 7
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 24/09/2024
    start_index_m3: 1483
    end_index_m3: 1483
    volume_m3: 0.42
    energy_kwh: 5
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 23/09/2024
    start_index_m3: 1482
    end_index_m3: 1483
    volume_m3: 0.54
    energy_kwh: 6
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 22/09/2024
    start_index_m3: 1481
    end_index_m3: 1482
    volume_m3: 0.9
    energy_kwh: 10
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 21/09/2024
    start_index_m3: 1480
    end_index_m3: 1481
    volume_m3: 0.89
    energy_kwh: 10
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 20/09/2024
    start_index_m3: 1480
    end_index_m3: 1480
    volume_m3: 0.8
    energy_kwh: 9
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 19/09/2024
    start_index_m3: 1479
    end_index_m3: 1480
    volume_m3: 0.48
    energy_kwh: 5
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 18/09/2024
    start_index_m3: 1478
    end_index_m3: 1479
    volume_m3: 0.64
    energy_kwh: 7
    converter_factor_kwh/m3: 11.31554
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 17/09/2024
    start_index_m3: 1478
    end_index_m3: 1478
    volume_m3: 0.53
    energy_kwh: 6
    converter_factor_kwh/m3: 11.43831
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: 16/09/2024
    start_index_m3: 1477
    end_index_m3: 1478
    volume_m3: 0.56
    energy_kwh: 6
    converter_factor_kwh/m3: 11.43831
    temperature_degC: null
    type: Mesuré
    timestamp: '2024-10-02T05:27:37.055408'
    Weekly
  • time_period: Du 23/09/2024 au 29/09/2024
    start_index_m3: 1482
    end_index_m3: 1487
    volume_m3: 4.78
    energy_kwh: 54
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 16/09/2024 au 22/09/2024
    start_index_m3: 1477
    end_index_m3: 1482
    volume_m3: 4.8
    energy_kwh: 53
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 09/09/2024 au 15/09/2024
    start_index_m3: 1473
    end_index_m3: 1477
    volume_m3: 4.859999999999999
    energy_kwh: 56
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 02/09/2024 au 08/09/2024
    start_index_m3: 1468
    end_index_m3: 1473
    volume_m3: 4.4399999999999995
    energy_kwh: 51
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 26/08/2024 au 01/09/2024
    start_index_m3: 1464
    end_index_m3: 1468
    volume_m3: 3.81
    energy_kwh: 44
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 19/08/2024 au 25/08/2024
    start_index_m3: 1460
    end_index_m3: 1464
    volume_m3: 4.26
    energy_kwh: 49
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 12/08/2024 au 18/08/2024
    start_index_m3: 1460
    end_index_m3: 1460
    volume_m3: 0.14
    energy_kwh: 2
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 05/08/2024 au 11/08/2024
    start_index_m3: 1458
    end_index_m3: 1460
    volume_m3: 2.04
    energy_kwh: 24
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 29/07/2024 au 04/08/2024
    start_index_m3: 1455
    end_index_m3: 1458
    volume_m3: 2.92
    energy_kwh: 33
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 22/07/2024 au 28/07/2024
    start_index_m3: 1452
    end_index_m3: 1455
    volume_m3: 3.31
    energy_kwh: 38
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 25/09/2023 au 01/10/2023
    start_index_m3: 780
    end_index_m3: 785
    volume_m3: 4.53
    energy_kwh: 54
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 18/09/2023 au 24/09/2023
    start_index_m3: 776
    end_index_m3: 780
    volume_m3: 4.710000000000001
    energy_kwh: 55
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 11/09/2023 au 17/09/2023
    start_index_m3: 771
    end_index_m3: 776
    volume_m3: 4.4
    energy_kwh: 50
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 04/09/2023 au 10/09/2023
    start_index_m3: 767
    end_index_m3: 771
    volume_m3: 4.21
    energy_kwh: 47
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 28/08/2023 au 03/09/2023
    start_index_m3: 762
    end_index_m3: 767
    volume_m3: 4.67
    energy_kwh: 53
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 21/08/2023 au 27/08/2023
    start_index_m3: 759
    end_index_m3: 762
    volume_m3: 3
    energy_kwh: 34
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 14/08/2023 au 20/08/2023
    start_index_m3: 757
    end_index_m3: 759
    volume_m3: 2.18
    energy_kwh: 26
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 07/08/2023 au 13/08/2023
    start_index_m3: 752
    end_index_m3: 757
    volume_m3: 4.859999999999999
    energy_kwh: 55
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 31/07/2023 au 06/08/2023
    start_index_m3: 749
    end_index_m3: 752
    volume_m3: 3.39
    energy_kwh: 39
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Du 24/07/2023 au 30/07/2023
    start_index_m3: 744
    end_index_m3: 749
    volume_m3: 4.52
    energy_kwh: 51
    timestamp: '2024-10-02T05:27:37.055408'
    Monthly
  • time_period: Septembre 2024
    start_index_m3: 1467
    end_index_m3: 1487
    volume_m3: 19.64
    energy_kwh: 223
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Août 2024
    start_index_m3: 1456
    end_index_m3: 1467
    volume_m3: 11.32
    energy_kwh: 130
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Juillet 2024
    start_index_m3: 1442
    end_index_m3: 1456
    volume_m3: 14.04
    energy_kwh: 162
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Juin 2024
    start_index_m3: 1421
    end_index_m3: 1442
    volume_m3: 21.34
    energy_kwh: 241
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Mai 2024
    start_index_m3: 1387
    end_index_m3: 1421
    volume_m3: 33.42
    energy_kwh: 378
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Avril 2024
    start_index_m3: 1355
    end_index_m3: 1387
    volume_m3: 32.02
    energy_kwh: 363
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Mars 2024
    start_index_m3: 1272
    end_index_m3: 1355
    volume_m3: 82.92
    energy_kwh: 944
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Février 2024
    start_index_m3: 1164
    end_index_m3: 1272
    volume_m3: 108.32
    energy_kwh: 1235
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Janvier 2024
    start_index_m3: 1008
    end_index_m3: 1164
    volume_m3: 155.58
    energy_kwh: 1771
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Décembre 2023
    start_index_m3: 885
    end_index_m3: 1008
    volume_m3: 123.48
    energy_kwh: 1398
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Novembre 2023
    start_index_m3: 805
    end_index_m3: 885
    volume_m3: 80.31
    energy_kwh: 906
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Octobre 2023
    start_index_m3: 784
    end_index_m3: 805
    volume_m3: 20.69
    energy_kwh: 237
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Septembre 2023
    start_index_m3: 765
    end_index_m3: 784
    volume_m3: 18.91
    energy_kwh: 218
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Août 2023
    start_index_m3: 749
    end_index_m3: 765
    volume_m3: 15.65
    energy_kwh: 178
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Juillet 2023
    start_index_m3: 733
    end_index_m3: 749
    volume_m3: 16.41
    energy_kwh: 184
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Juin 2023
    start_index_m3: 713
    end_index_m3: 733
    volume_m3: 19.89
    energy_kwh: 227
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Mai 2023
    start_index_m3: 684
    end_index_m3: 713
    volume_m3: 28.6
    energy_kwh: 325
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Avril 2023
    start_index_m3: 636
    end_index_m3: 684
    volume_m3: 48.81
    energy_kwh: 556
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Mars 2023
    start_index_m3: 543
    end_index_m3: 636
    volume_m3: 92.58
    energy_kwh: 1046
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Février 2023
    start_index_m3: 409
    end_index_m3: 543
    volume_m3: 133.68
    energy_kwh: 1520
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Janvier 2023
    start_index_m3: 223
    end_index_m3: 409
    volume_m3: 186.47
    energy_kwh: 2136
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: Décembre 2022
    start_index_m3: 56
    end_index_m3: 223
    volume_m3: 167.14000000000001
    energy_kwh: 1913
    timestamp: '2024-10-02T05:27:37.055408'
    Yearly
  • time_period: '2024'
    start_index_m3: 1008
    end_index_m3: 1487
    volume_m3: 478.6
    energy_kwh: 5447
    timestamp: '2024-10-02T05:27:37.055408'
  • time_period: '2023'
    start_index_m3: 223
    end_index_m3: 1008
    volume_m3: 785.48
    energy_kwh: 8931
    timestamp: '2024-10-02T05:27:37.055408'
    Data provided by GrDF

@enthalpie91
Copy link

@Beachloft si tu veux plus de détail il faut demander à ton fournisseur de mettre en place la relève journalière et horaire éventuellement

@Beachloft
Copy link
Author

Apparemment le compteur est relevé deux fois par jour. pas possible d'avoir un relevé horaire.

@enthalpie91
Copy link

enthalpie91 commented Oct 2, 2024

@Beachloft non avec gaspar il est possible d'avoir des relevés journaliers ou horaire. c'est GRDF qui le fait sur demande de ton fournisseur. et c'est toi qui fait la demande à ton fournisseur.
il y a peut-être des exceptions avec les régies municipales ?? mais là c'est hors sujet.
En Plus le graphique que tu montre est celui de la carte énergie si tu prends la carte gaspar tu auras un graphique personnalisé avec les consommations journalière
Screenshot_20241002_181110

@Beachloft
Copy link
Author

Bonjour Je suis chez Engie. Ok je vais creuser sur la carte Gazpar.
Merci pour tout
Olivier

@enthalpie91
Copy link

@Beachloft pas le moment !! gaspar est planté suite à la mise à jour du core en 2024.10.0, voir les messages ci-dessus
faut attendre que tout rentre dans l'ordre soit avec une maj de gaspar, soit une autre version du core

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

No branches or pull requests

3 participants