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

'HX711' object has no attribute 'get_weight' #41

Open
Schmediii opened this issue Apr 17, 2021 · 5 comments
Open

'HX711' object has no attribute 'get_weight' #41

Schmediii opened this issue Apr 17, 2021 · 5 comments

Comments

@Schmediii
Copy link

Hello everyone,

I tested your programm, but i have a error: AttributeError: 'HX711' object has no attribute 'get_weight'.

What have i done wrong? Can someone help me.

Thank you

@tatobari
Copy link
Owner

tatobari commented Apr 17, 2021 via email

@Schmediii
Copy link
Author

Schmediii commented Apr 17, 2021

Yes sure, the code is from the example.py:

https://github.com/tatobari/hx711py/blob/master/example.py

And this is the error message:

Tare done! Add weight now... Traceback (most recent call last): File "gewicht1.py", line 65, in <module> val = hx.get_weight(5) AttributeError: 'HX711' object has no attribute 'get_weight'

@carlosbarilatti
Copy link
Contributor

Hummm, this repository doesn't have any file called gewicht1.py. Is there a chance that you might be calling hx.get_weight() from a file.on your code called gewicht1.py but you didn't import hx711 correctly?

@Schmediii
Copy link
Author

Well, i made a repository for th gewicht1.py.
Bevore i installed hx711 with the code: pip3 install HX711

I now tried it with this tutorial: https://tutorials-raspberrypi.de/raspberry-pi-waage-bauen-gewichtssensor-hx711/

So i installed the library with: git clone https://github.com/tatobari/hx711py

Then in the repository: cd hx711py

I run then the example.py

Now the code works but i become just many 0.0. Is this right?

@kaaarim234
Copy link

Well, i made a repository for th gewicht1.py. Bevore i installed hx711 with the code: pip3 install HX711

I now tried it with this tutorial: https://tutorials-raspberrypi.de/raspberry-pi-waage-bauen-gewichtssensor-hx711/

So i installed the library with: git clone https://github.com/tatobari/hx711py

Then in the repository: cd hx711py

I run then the example.py

Now the code works but i become just many 0.0. Is this right?

Hi, have you sold your issues where your load cell only reads 0.0?
Been pounding my head because of this :/

Let me know 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants