GithubHelp home page GithubHelp logo

Division by zero in BS440csv.py about bs440 HOT 3 OPEN

aeff81 avatar aeff81 commented on July 3, 2024
Division by zero in BS440csv.py

from bs440.

Comments (3)

Boldfor avatar Boldfor commented on July 3, 2024 1

@aeff81, not sure whether I know what I'm doing ;) but I added a PR for this bug (creatvty#2) which fixed it for me.

@creatvty, please have a look.

from bs440.

Boldfor avatar Boldfor commented on July 3, 2024

This is not only relevant for „guest users“, and also not limited to the .csv-plugin (am using the mqtt-plugin): I have the BS 444, and sometimes the „user detection“ fails (or does not even start), which results in „only weight being sent“ (with everything else being blank). Also in these (multiple) cases they script stops with „division by 0“.

Traceback (most recent call last):
  File "/home/pi/BS440-HA-AD/BS440.py", line 332, in <module>
    appendBmi(persondata[0]['size'], weightdata)
  File "/home/pi/BS440-HA-AD/BS440.py", line 122, in appendBmi
    element['bmi'] = round(element['weight'] / (size * size), 1)
ZeroDivisionError: float division by zero

from bs440.

Boldfor avatar Boldfor commented on July 3, 2024

@aeff81, is merged and should be fixed. Maybe you can check and close the issue.

from bs440.

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.