Update to 57.2 gives 500 internal server error

Hi
Today I update Hass from 56.2 to 57.2. I have Hass running on a rpi3 in a python virtual env.
When connection to the rpi via http I get the 500 internal server error.
In homeassistant.log I can find this:

2017-11-11 11:57:48 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 278, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp/_http_parser.pyx", line 274, in aiohttp._http_parser.HttpParser.feed_data (aiohttp/_http_parser.c:4364)
File "aiohttp/_http_parser.pyx", line 334, in aiohttp._http_parser.cb_on_url (aiohttp/_http_parser.c:5381)
File "aiohttp/_http_parser.pyx", line 544, in aiohttp._http_parser._parse_url (aiohttp/_http_parser.c:8777)
File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/http_writer.py", line 317, in __init__
path = yarl.quote(path, safe='@:', protected='/', strict=False)
File "yarl/_quoting.pyx", line 38, in yarl._quoting._quote
TypeError: _quote() got an unexpected keyword argument 'strict'

Any idea why this is going wrong? Or should I update python from 3.5 to 3.6?

[edit]A downgrade of hass to 0.56.2 did not solve the issues. Still the same errors.
[SOLVED]pip3 install yarl==0.13.0
from within the virtual env and then restarting hass did fix this for me.
Apperently yarl did upgrade to 0.14.0 which caused an error.

Same here, just upgraded to 0.57.2 from 0.57.1, and getting “500 Internal Server Error”.
No change to the configuration. Also tried to reboot the RPi2.

This is the trace in the log:

Nov 11 13:19:18 hassbian hass[601]: — Logging error —
Nov 11 13:19:18 hassbian hass[601]: Traceback (most recent call last):
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/logging/init.py”, line 978, in emit
Nov 11 13:19:18 hassbian hass[601]: msg = self.format(record)
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/logging/init.py”, line 828, in format
Nov 11 13:19:18 hassbian hass[601]: return fmt.format(record)
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/logging/init.py”, line 573, in format
Nov 11 13:19:18 hassbian hass[601]: record.exc_text = self.formatException(record.exc_info)
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/logging/init.py”, line 523, in formatException
Nov 11 13:19:18 hassbian hass[601]: traceback.print_exception(ei[0], ei[1], tb, None, sio)
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/traceback.py”, line 169, in print_exception
Nov 11 13:19:18 hassbian hass[601]: for line in _format_exception_iter(etype, value, tb, limit, chain):
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/traceback.py”, line 146, in _format_exception_iter
Nov 11 13:19:18 hassbian hass[601]: for value, tb in values:
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/traceback.py”, line 125, in _iter_chain
Nov 11 13:19:18 hassbian hass[601]: context = exc.context
Nov 11 13:19:18 hassbian hass[601]: AttributeError: ‘NoneType’ object has no attribute ‘context
Nov 11 13:19:18 hassbian hass[601]: Call stack:
Nov 11 13:19:18 hassbian hass[601]: File “/srv/homeassistant/bin/hass”, line 11, in
Nov 11 13:19:18 hassbian hass[601]: sys.exit(main())
Nov 11 13:19:18 hassbian hass[601]: File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/main.py”, line 366, in main
Nov 11 13:19:18 hassbian hass[601]: exit_code = setup_and_run_hass(config_dir, args)
Nov 11 13:19:18 hassbian hass[601]: File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/main.py”, line 293, in setup_and_run_hass
Nov 11 13:19:18 hassbian hass[601]: return hass.start()
Nov 11 13:19:18 hassbian hass[601]: File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py”, line 158, in start
Nov 11 13:19:18 hassbian hass[601]: self.loop.run_forever()
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/asyncio/base_events.py”, line 244, in run_forever
Nov 11 13:19:18 hassbian hass[601]: self._run_once()
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/asyncio/base_events.py”, line 1081, in _run_once
Nov 11 13:19:18 hassbian hass[601]: handle._run()
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/asyncio/events.py”, line 120, in _run
Nov 11 13:19:18 hassbian hass[601]: self._callback(*self._args)
Nov 11 13:19:18 hassbian hass[601]: File “/usr/lib/python3.4/asyncio/tasks.py”, line 237, in _step
Nov 11 13:19:18 hassbian hass[601]: result = next(coro)
Nov 11 13:19:18 hassbian hass[601]: File “/srv/homeassistant/lib/python3.4/site-packages/aiohttp/web_protocol.py”, line 557, in handle_parse_error
Nov 11 13:19:18 hassbian hass[601]: resp = self.handle_error(request, status, exc, message)
Nov 11 13:19:18 hassbian hass[601]: File “/srv/homeassistant/lib/python3.4/site-packages/aiohttp/web_protocol.py”, line 522, in handle_error
Nov 11 13:19:18 hassbian hass[601]: self.log_exception(“Error handling request”, exc_info=exc)
Nov 11 13:19:18 hassbian hass[601]: File “/srv/homeassistant/lib/python3.4/site-packages/aiohttp/web_protocol.py”, line 362, in log_exception
Nov 11 13:19:18 hassbian hass[601]: self.logger.exception(*args, **kw)
Nov 11 13:19:18 hassbian hass[601]: Message: ‘Error handling request’
Nov 11 13:19:18 hassbian hass[601]: Arguments: ()

Hi, just got the same trouble after update.

This solved the issue in virtual env:
pip3 install yarl==0.13.0

3 Likes

Thanks Molodax, that fixed the issue for me too.

any more ideas, that didnt work for me…:confused:

Did you restart home-assistant after downgrading yarl? That worked for me! :slight_smile:

yep, several times.
get “Successfully installed multidict-3.3.2 yarl-0.13.0”
then sudo reeboot… still “500 internal server error” and in logfile “2017-11-11 17:36:10 ERROR (MainThread) [aiohttp.server] Error handling request”

EDIT: works now, didnt downgrade in virtinv… :laughing:

1 Like

I have the same problem. 500 internal server error.

I have this on home-assistant.log:

2017-11-12 09:28:12 ERROR (MainThread) [homeassistant.components.http] Failed to create HTTP server at port 8123: [Errno 48] error while attempting to bind on address (‘0.0.0.0’, 8123): address already in use

I also did the command to fix it, but the same:

Requirement already satisfied: yarl==0.13.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Requirement already satisfied: multidict>=2.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from yarl==0.13.0)