custom-components / pyscript

Pyscript adds rich Python scripting to HASS
Apache License 2.0
874 stars 46 forks source link

Getting error message with "cannot import name 'DATA_RESTORE_STATE' " #483

Open karliwalti opened 1 year ago

karliwalti commented 1 year ago

Installed pyscript manually by copying manually into custom_component from git branch main. Getting following error from basic validation of configuration.yaml

Component error: pyscript - cannot import name 'DATA_RESTORE_STATE' from 'homeassistant.helpers.restore_state' (/usr/src/homeassistant/homeassistant/helpers/restore_state.py)

likely linked to https://github.com/custom-components/pyscript/commit/716ffd7f88a0f69cf395a3a62678758775115861 as when I check out an older version it works fine.

craigbarratt commented 1 year ago

What version of HA are you running?

simona70 commented 1 year ago

Same problem with HA 2022.6.7.

Component error: pyscript - cannot import name 'DATA_RESTORE_STATE' from 'homeassistant.helpers.restore_state' (/usr/src/homeassistant/homeassistant/helpers/restore_state.py)

craigbarratt commented 1 year ago

Ok, thanks for reporting the failing version. Seems like that commit broke backward compatibility. Any chance you can upgrade to a more recent HA version?

paulthemann commented 11 months ago

just got the same: Home Assistant 2023.5.4

craigbarratt commented 11 months ago

A workaround would be to run the prior version of pyscript if you have an older verison of HA.

simona70 commented 11 months ago

Thx... done.


Simona

Il giorno mar 10 ott 2023 alle ore 18:29 Craig Barratt < @.***> ha scritto:

A workaround would be to run the prior version of pyscript if you have an older verison of HA.

— Reply to this email directly, view it on GitHub https://github.com/custom-components/pyscript/issues/483#issuecomment-1755798724, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5PBXLXWA6IVYKX4KBCMUTX6VZXNAVCNFSM6AAAAAA2B6ADW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVG44TQNZSGQ . You are receiving this because you commented.Message ID: @.***>