2021.7 broke Rainbird integration

Running core in docker on Unraid
dropped back to

homeassistant/home-assistant:2021.6.5 it now works

homeassistant/home-assistant:2021.7.1 does not

Error below

‘’’
Logger: homeassistant.setup
Source: components/rainbird/init.py:4
First occurred: 2:52:04 PM (1 occurrences)
Last logged: 2:52:04 PM
Setup failed for rainbird: unknown error

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 201, in _async_setup_component
component = integration.get_component()
File “/usr/src/homeassistant/homeassistant/loader.py”, line 490, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File “/usr/local/lib/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 855, in exec_module
File “”, line 228, in _call_with_frames_removed
File “/usr/src/homeassistant/homeassistant/components/rainbird/init.py”, line 4, in
from pyrainbird import RainbirdController
File “/usr/local/lib/python3.9/site-packages/pyrainbird/init.py”, line 14, in
from pyrainbird.resources import RAIBIRD_COMMANDS
File “/usr/local/lib/python3.9/site-packages/pyrainbird/resources/init.py”, line 6, in
RAIBIRD_COMMANDS = json.loads(resource_string(‘pyrainbird.resources’, ‘sipcommands.json’).decode(“UTF-8”),
File “/usr/local/lib/python3.9/json/init.py”, line 359, in loads
return cls(**kw).decode(s)
TypeError: init() got an unexpected keyword argument ‘encoding’
‘’’

2 Likes

Saw the same thing in beta. I rolled back as I thought it was part of the reverse proxy breaking change so I didn’t report it as an issue.

Notice this too today. My Rainbrid integration is not functioning with latest version

I had some time and fixed it on my system.

It appears that the github repository for pyrainbird has the fix for python 3.9, but when I checked on my homeassistant install and the pyrainbird python scripts, it was an older version. I manually fixed the file and it is now working for me.

I’m running hassio (intel, Hyper-V). To fix it I:

  1. logged into homeassistant via ssh
  2. exec bash for docker container homeassistant “docker exec -it homeassistant /bin/bash”
  3. located init.py in the pyrainbird folder (/usr/local/lib/python3.9/site-package/pyrainbird/resources
  4. using nano edited the file by removing the encoding keyword (I have nano installed; you can install it with “apt add nano”)
  5. save and restarted homeassistant core

This worked for me. Thank you! I guess until I update the docker container for the next release. Maybe it will be fixed by then

Also broken for me :frowning:

Also broken for me. In addition I cannot restart the server. I get an error message " Failed to call service homeassistant/restart. init() got an unexpected keyword argument ‘encoding’" that to me looks like it could be caused by the same Python issue…

1 Like

This should be fixed as part of 2021.7.3 see the list of closed items set for that release:

1 Like

Confirmed its fixed in 2017.7.3

3 Likes