Code Monkey home page Code Monkey logo

Comments (6)

mampfes avatar mampfes commented on May 27, 2024 1

fixed in release 1.16.0

from hacs_waste_collection_schedule.

mampfes avatar mampfes commented on May 27, 2024

I agree that the home assistant log should not be flodded with error messages. From my experience, the services are available almost 100% (to be honest, I have never experienced an outage). Therefore a missing fetch is a noticeable failure which I have no doubt to write to the log (once per day). Do you have other experiences?

from hacs_waste_collection_schedule.

ThomDietrich avatar ThomDietrich commented on May 27, 2024

Seems like it. In fact two of my Home Assistant instances that query the AWM München web service have the issue in their log. #106 Can't currently say when or how often this happens.

image

Happy to keep an eye out for it.

Therefore a missing fetch is a noticeable failure

While at it, maybe you could improve the message a little. The typical end user will only be distracted by the object address and the error can be omitted. In fact the error can probably be further disected

from hacs_waste_collection_schedule.

ThomDietrich avatar ThomDietrich commented on May 27, 2024

Traced the error and had to find out that @jberrenberg already commited a fix. Thanks! 47f8250

Food for thought: This would have been a lot easier without the cascade of super generic try ... except Exception blocks in the code. Python offers a lot more than that. Example: After removing them it took me seconds to identify the error and a solution.

Feel free to close the issue

from hacs_waste_collection_schedule.

mampfes avatar mampfes commented on May 27, 2024

Agree. The error message and the try .. except cascade is bad. Feel free to submit a PR :-)

from hacs_waste_collection_schedule.

ThomDietrich avatar ThomDietrich commented on May 27, 2024

I would be happy to but I feel this is a job better suited for someone who has a deeper understanding of the project, to make the right structural decisions.

Let's discuss. I would probably approach this by putting a try...except block around entries = self._source.fetch() alone. This method is just too explosive looking at all the different sources already implemented. Next I would break out different Exception classes to narrow down the error. Alternatively or additionally use the traceback library to recover the trace for logging. In case of doubt I would always want more logging details.

from hacs_waste_collection_schedule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.