Solved - Hass.io corrupt after power down even after correct shutdown

So everytime i unplug the RP3 after shutdown, powerloss, whatever i cannot get hass.io back working again.
Last time i stopped homeassitant. After that i turned off the system via ssh: hassio ho shutdown.
.

This is what i got after that:

core-ssh:~# hassio ha logs
Error decoding json invalid character ‘E’ looking for beginning of value: Error processing line 1 of /usr/local/lib/python3.6/site-packages/googleapis_common_protos-1.5.5-py3.6-nspkg.pth:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site.py”, line 168, in addpackage
exec(line)
File “”, line 1, in
File “”, line 568, in module_from_spec
AttributeError: ‘NoneType’ object has no attribute ‘loader’
Remainder of file ignored
Error processing line 1 of /usr/local/lib/python3.6/site-packages/protobuf-3.6.1-nspkg.pth:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site.py”, line 168, in addpackage
exec(line)
File “”, line 1, in
File “”, line 568, in module_from_spec
AttributeError: ‘NoneType’ object has no attribute ‘loader’
Remainder of file ignored
/usr/local/bin/python3: No module named homeassistant

so i restartet the system again, but i even couldnt ssh into hassio anymore. So i had to flash everything AGAIN.

What am i doing wrong?

I guess its possible that the shutdown is still going on when you unplug your Pi. If you shutdown ha from the cli, you will notice that it takes some time (hassio homeassistant stop), then the OS needs to shutdown as well.
If you wanted to be extra safe, stop HA, then shutdown hassio. That way all of the HA services are stopped and the files are closed cleanly.

thx dap35. Seems to be i was a little bit too fast with pulling the plug

Be sure your Pi power supply is at least 2.5 amps and I have seen a lot of issues with SD card compatibility being a corruption culprit. I use Pi’s for several other things beside hassio and have had SD card corruption problems. My experience has been Samsung SD Cards and Pi’s get along well while other name brands do not seem to.