prixCarburant-home-assistant icon indicating copy to clipboard operation
prixCarburant-home-assistant copied to clipboard

PrixCarburant_quotidien_{}.xml are not deleted

Open MisterTdog opened this issue 3 years ago • 4 comments

L'intégration PrixCarburant semble correctement installé sur HA (HACS). Elle semble correctement fonctionnement chez moi, mais j'ai des "tonnes" de fichier "PrixCarburant_quotidien_{date}.xml" qui s'accumulent... Ils ne semblent jamais supprimés. Dans les logs j'ai :

2021-07-01 14:45:01 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.prixcarburant_85500002 fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 350, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 558, in async_device_update raise exc File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/prixCarburant/sensor.py", line 163, in update self.client.clean() File "/usr/local/lib/python3.8/site-packages/prixCarburantClient/prixCarburantClient.py", line 221, in clean self.removeFile("station.csv") File "/usr/local/lib/python3.8/site-packages/prixCarburantClient/prixCarburantClient.py", line 130, in removeFile os.remove(file) FileNotFoundError: [Errno 2] No such file or directory: 'station.csv'

MisterTdog avatar Jul 01 '21 13:07 MisterTdog

Bonjour,

Pareil de mon coté et je confirme, ils ne se suppriment pas

lacrima08 avatar Jul 24 '21 14:07 lacrima08

Bonjour, J'ai fait une de version sous hacs pour corriger ce problème. je veux bien un retour suite à cette mise à jour. Les fichiers actuellement bloqués sont à supprimer manuellement (désolé) Les nouveaux iront temporairement dans un dossier PrixCarburantsData pour ne plus polluer la racine du config.

ryann72 avatar Oct 11 '21 14:10 ryann72

Bonjour, @ryann72

A priori, cela fonctionne. J'ai supprimé les anciens fichiers à la main et fait la maj. Je n'ai plus de fichiers qui s'incrémentent dans la racine de config.

Merci Yann !

lacrima08 avatar Oct 15 '21 05:10 lacrima08

mergé ! merci @ryann72 , si vous confirmez que c'est OK poru vous, je fermerait le ticket :)

max5962 avatar Nov 08 '21 15:11 max5962