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

Setting a keg tare weight or volume to 0 causes a division by zero error #2

Open
yesrod opened this issue Apr 26, 2020 · 2 comments
Open
Labels
bug Something isn't working

Comments

@yesrod
Copy link
Owner

yesrod commented Apr 26, 2020

This happens in both web and main processes.

Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/__main__.py", lin
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/__main__.py", lin
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/hoplite.py", line
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/hoplite.py", line
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/hoplite.py", line
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/hoplite.py", line
Apr 26 21:18:37 hoplite python2[2293]: ZeroDivisionError: float division by zero
Apr 26 21:18:37 hoplite python2[2294]: remi.update      ERROR    error updating gui
Apr 26 21:18:37 hoplite python2[2294]: Traceback (most recent call last):
Apr 26 21:18:37 hoplite python2[2294]:   File "/usr/local/lib/python2.7/dist-packages/remi/server.py"
Apr 26 21:18:37 hoplite python2[2294]:     client.idle()
Apr 26 21:18:37 hoplite python2[2294]:   File "build/bdist.linux-armv6l/egg/hoplite/web.py", line 95,
Apr 26 21:18:37 hoplite python2[2294]:     i = int(index) - 1
Apr 26 21:18:37 hoplite python2[2294]:   File "build/bdist.linux-armv6l/egg/hoplite/web.py", line 77,
Apr 26 21:18:37 hoplite python2[2294]:     except KeyError:
Apr 26 21:18:37 hoplite python2[2294]: ZeroDivisionError: float division by zero
@yesrod
Copy link
Owner Author

yesrod commented Apr 27, 2020

This happens when any of the size parameters in the config are set to zero.

Need to implement some method of checking and correcting those when a config is loaded or passed back from the web process via shmem.

@yesrod
Copy link
Owner Author

yesrod commented May 11, 2020

This will be fixed as part of implementing the REST API, as that will become the one supported method for configuring Hoplite.

@yesrod yesrod added the bug Something isn't working label Oct 18, 2020
@yesrod yesrod changed the title Setting a keg weight or volume to 0 causes a division by zero error Setting a keg tare weight or volume to 0 causes a division by zero error Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant