Skip to content

AttributeError: 'int' object has no attribute 'write_byte' #10

@texasbobs

Description

@texasbobs

When I run sht21.py alone, it completes and prints the proper values. When I run it with the sample in the readme, I get the attribute error. Being quite the noob, I'm not sure exactly how to fix that. Any guidance would be appreciated.

Traceback (most recent call last):
File "wx-02.py", line 2, in
with sht21.SHT21(1) as sht21:
File "/home/pi/wx/sht21.py", line 20, in init
self.bus.write_byte(self._I2C_ADDRESS, self._SOFTRESET)
AttributeError: 'int' object has no attribute 'write_byte'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions