ooii / pySuez

Get your water consumption data from your Suez account (www.toutsurmoneau.fr)
Apache License 2.0
8 stars 13 forks source link

Handling 500 responses #6

Open sannremy opened 4 years ago

sannremy commented 4 years ago

Hi @ooii

Thanks for this library, super useful! Actually found it through Home Assistant integrations :)

I got an error when trying to pull my data: Oct. 1st, no data yet. I've added debug lines and it looks like Suez's website returns a 500 when there is no data to show. It ends the process to return data of previous months.

$ pysuez -u EMAIL -p PASSWORD -c ID

Request URL: https://www.toutsurmoneau.fr/mon-compte-en-ligne/statJData/2020/10/ID
Response HTTP code: <Response [500]>

Issue with this month data

I know it's a bug on Suez's website, but I think the library should handle those error cases. Happy to help and to create a PR! :)

Cheers!

ooii commented 1 year ago

Guys, I'm sorry for not responding to these issues. I was very busy with other stuff and, to be honest, the integration was not satisfactory for me, so I stopped using it (and looking to this repo). I got some complaints recently and decided to give a look and discovered all these issues. I'll try to bring a new and better integration that takes into consideration all the issues and sub-providers, and I'll try to make it doable from the UI. Please, be patient.