-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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
0.59: iOS updates failing #10920
Comments
May be this is related, but I am seeing slightly different errors:
|
That is the same error, the important bit being:
When writing the updated |
I thought so too 👍 pinging @mnigbur so that he can investigate and hopefully fix the same. |
Specifically, it is the |
The iOS code was using JSONEncoder which has handling for dates, sets, and dict-like objects. Perhaps that code should move to json.py so all consumers get that behaviour. |
@mnoorenberghe yeah, that is the approach I took. |
@wrboyce Can we use the fix in |
That needs the fix to be self-contained inside the from homebridge.remote import JSONEncoder
def save_json(filename: str, config: Union[List, Dict]):
try:
data = json.dumps(config, sort_keys=True, indent=4, cls=JSONEncoder)
with open(filename, 'w', encoding='utf-8') as fdesc:
fdesc.write(data)
return True
except TypeError as error:
_LOGGER.exception('Failed to serialize to JSON: %s',
filename)
raise HomeAssistantError(error)
except OSError as error:
_LOGGER.exception('Saving JSON file failed: %s',
filename)
raise HomeAssistantError(error)
return False I think that should do you. |
That did not work. Here's my ios.py and here is the stack trace:
|
All right adding |
For anyone interested, here's the ios.py that should fix the error until the next bugfix release. |
There are few different errors...are you on discord to debug in realtime? |
I can be, got a link handy? |
Home Assistant release (
hass --version
):0.59
Python release (
python3 --version
):3.5.2
Component/platform:
iOS
Description of problem:
Since updating to 0.59 updates from iOS app do not work.
Traceback (if applicable):
Additional info:
Seems to have been introduced in #10677. I have confirmed that
pip install -U 'homeassistant<0.59'
"fixes" the issue.The text was updated successfully, but these errors were encountered: