Hassio not starting after updating to 0.68.0

After updating my HASSIO to 0.68.0, it won`t start up again, running on rp3. Here is the log:

Error decoding json invalid character ‘-’ after top-level value: 2018-04-28 20:04:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=turn_off>
2018-04-28 20:04:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=turn_on>
2018-04-28 20:04:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=toggle>
2018-04-28 20:04:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=stop>
2018-04-28 20:04:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=restart>
2018-04-28 20:04:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=check_config>
2018-04-28 20:04:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=reload_core_config>
2018-04-28 20:04:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=persistent_notification, service=create>
2018-04-28 20:04:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=persistent_notification, service=dismiss>
2018-04-28 20:04:23 INFO (MainThread) [homeassistant.bootstrap] Home Assistant core initialized
2018-04-28 20:04:25 INFO (MainThread) [homeassistant.loader] Loaded frontend from homeassistant.components.frontend
2018-04-28 20:04:25 INFO (MainThread) [homeassistant.loader] Loaded api from homeassistant.components.api
2018-04-28 20:04:25 INFO (MainThread) [homeassistant.loader] Loaded http from homeassistant.components.http
2018-04-28 20:04:25 INFO (MainThread) [homeassistant.loader] Loaded websocket_api from homeassistant.components.websocket_api
2018-04-28 20:04:25 INFO (MainThread) [homeassistant.loader] Loaded system_log from homeassistant.components.system_log
2018-04-28 20:04:25 INFO (MainThread) [homeassistant.loader] Loaded history from homeassistant.components.history
2018-04-28 20:04:25 INFO (MainThread) [homeassistant.loader] Loaded recorder from homeassistant.components.recorder
2018-04-28 20:04:25 INFO (MainThread) [homeassistant.loader] Loaded mqtt from homeassistant.components.mqtt
2018-04-28 20:04:26 INFO (MainThread) [homeassistant.loader] Loaded logger from homeassistant.components.logger
2018-04-28 20:04:26 INFO (MainThread) [homeassistant.setup] Setting up logger
Unhandled exception in thread started by <bound method Thread._bootstrap of <Recorder(Recorder, started 1954303268)>>
Traceback (most recent call last):
File “/usr/lib/python3.6/threading.py”, line 916, in _bootstrap_inner
self.run()
File “/usr/lib/python3.6/site-packages/homeassistant/components/recorder/init.py”, line 189, in run
from .models import States, Events
File “/usr/lib/python3.6/site-packages/homeassistant/components/recorder/models.py”, line 6, in
from sqlalchemy import (
File “/usr/lib/python3.6/site-packages/sqlalchemy/init.py”, line 9, in
from .sql import (
File “/usr/lib/python3.6/site-packages/sqlalchemy/sql/init.py”, line 8, in
File “/usr/lib/python3.6/site-packages/sqlalchemy/sql/expression.py”, line 35, in
from .functions import func, modifier, FunctionElement, Function
File “/usr/lib/python3.6/site-packages/sqlalchemy/sql/functions.py”, line 11, in
from . import sqltypes, schema
File “/usr/lib/python3.6/site-packages/sqlalchemy/sql/sqltypes.py”, line 26, in
from … import event
ValueError: source code string cannot contain null bytes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/tokenize.py”, line 390, in find_cookie
line_string = line.decode(‘utf-8’)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xb1 in position 0: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/threading.py”, line 884, in _bootstrap
self._bootstrap_inner()
File “/usr/lib/python3.6/threading.py”, line 926, in _bootstrap_inner
(self.name, _format_exc()), file=_sys.stderr)
File “/usr/lib/python3.6/traceback.py”, line 163, in format_exc
return “”.join(format_exception(*sys.exc_info(), limit=limit, chain=chain))
File “/usr/lib/python3.6/traceback.py”, line 117, in format_exception
type(value), value, tb, limit=limit).format(chain=chain))
File “/usr/lib/python3.6/traceback.py”, line 497, in init
capture_locals=capture_locals)
File “/usr/lib/python3.6/traceback.py”, line 358, in extract
f.line
File “/usr/lib/python3.6/traceback.py”, line 282, in line
self._line = linecache.getline(self.filename, self.lineno).strip()
File “/usr/lib/python3.6/linecache.py”, line 16, in getline
lines = getlines(filename, module_globals)
File “/usr/lib/python3.6/linecache.py”, line 47, in getlines
return updatecache(filename, module_globals)
File “/usr/lib/python3.6/linecache.py”, line 136, in updatecache
with tokenize.open(fullname) as fp:
File “/usr/lib/python3.6/tokenize.py”, line 454, in open
encoding, lines = detect_encoding(buffer.readline)
File “/usr/lib/python3.6/tokenize.py”, line 431, in detect_encoding
encoding = find_cookie(first)
File “/usr/lib/python3.6/tokenize.py”, line 395, in find_cookie
raise SyntaxError(msg)
SyntaxError: invalid or missing encoding declaration for ‘/usr/lib/python3.6/site-packages/sqlalchemy/sql/init.py’

Did an downgrade and I`m up-and-running on 0.67.1

Not sure if it’s the same issue but mine didn’t start after upgrading either… Even the docker image refused to start… Restoring a backup now.

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.6/site-packages/homeassistant/__main__.py", line 376, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/homeassistant/__main__.py", line 351, in main
    args = get_arguments()
  File "/usr/lib/python3.6/site-packages/homeassistant/__main__.py", line 84, in get_arguments
    import homeassistant.config as config_util
  File "/usr/lib/python3.6/site-packages/homeassistant/config.py", line 22, in <module>
    from homeassistant.core import callback, DOMAIN as CONF_CORE
  File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 36, in <module>
    from homeassistant.util.async_ import (
ModuleNotFoundError: No module named 'homeassistant.util.async_'

Hello,

@vstoms : I’ve encountered the same pb :

Exception in thread Recorder:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/homeassistant/components/recorder/__init__.py", line 189, in run
    from .models import States, Events
  File "/usr/lib/python3.6/site-packages/homeassistant/components/recorder/models.py", line 6, in <module>
    from sqlalchemy import (
ImportError: cannot import name 'Boolean'

I tryed various things.
Finally it seems to be linked to my config. Works in 67 but not in 68…
to make it works on 68.1 I need to remove all conf related to [recorder:] and [history:]

Hi, I think I have the same problem. Can you explain how you did the downgrade. Are you using Hassio on a Raspberry Pi or is it in a Docker container? How long does the downgrade take? Do you do it via SSH? What is displayed on the screen happens when it completes?
Thanks.

One other question. Can you tell me how to get the log. Thanks

You need SSH-addon enabled to see the logs and downgrade hassio.

Use curl '{"version": "0.67.1"}' http://hassio/homeassistant/update to downgrade to 0.67.1

To get the logs, use hassio ha logs

1 Like

Hi. Thanks for the prompt reply. I’ve seen this elsewhere and believe that sometimes cutting and pasting it doesn’t work. That said I have typed it it in and hit enter and get a > returned. I have then waited for at least 15 minutes but nothing else seems to happen. Should i wait longer?

Yep I found the same issue - see my post. I had to rename my original config.yml and reboot my Pi.
Fortunately I had backups of all my ymls on my pc so I was able to copy them back.
Moral of the story: offline copy all your ymls before upgrading.

1 Like