500 Internal Server Error after install on windows 10

Hi,
After installing on windows 10 and after I run “python -m homeassistant --open-ui” the browser opens http://10.0.0.10:8123/ and I got 500 Internal Server Error.
Can someone help ?

Here is the log of the console:

ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File “D:\Install\python\lib\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 “D:\Install\python\lib\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’
ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File “D:\Install\python\lib\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 “D:\Install\python\lib\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’
INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sun.sun, old_state=<state sun.sun=above_horizon; next_dawn=2017-11-12T03:40:21+00:00, next_dusk=2017-11-11T15:10:21+00:00, next_midnight=2017-11-11T21:25:08+00:00, next_noon=2017-11-12T09:25:04+00:00, next_rising=2017-11-12T04:05:57+00:00, next_setting=2017-11-11T14:44:48+00:00, elevation=16.66, azimuth=236.29, friendly_name=Sun @ 2017-11-11T15:12:19.195095+02:00>, new_state=<state sun.sun=above_horizon; next_dawn=2017-11-12T03:40:21+00:00, next_dusk=2017-11-11T15:10:21+00:00, next_midnight=2017-11-11T21:25:08+00:00, next_noon=2017-11-12T09:25:04+00:00, next_rising=2017-11-12T04:05:57+00:00, next_setting=2017-11-11T14:44:48+00:00, elevation=16.62, azimuth=236.32, friendly_name=Sun @ 2017-11-11T15:12:19.195095+02:00>>

This is being caused by the yarl package, which was upgraded to from 0.13.0 to 0.14.0. Downgrade it using pip (pip install yarl=0.13.0 and restart HA and you should be fine again!)

https://github.com/home-assistant/home-assistant/issues/10524

Thanks, it solved the problem and now I can see the UI but there is another problem.
Now I get “Invalid config”
The following components and platforms could not be set up: Discovery.
Can someone help ?

In the console I can see:
ERROR:homeassistant.util.package:Unable to install package netdisco==1.2.3: Command “D:\Install\python\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\yoni\AppData\Local\Temp\pip-build-l3sig6ih\netifaces\setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record C:\Users\yoni\AppData\Local\Temp\pip-3q59jdmv-record\install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in C:\Users\yoni\AppData\Local\Temp\pip-build-l3sig6ih\netifaces
ERROR:homeassistant.setup:Not initializing discovery because could not install dependency netdisco==1.2.3
ERROR:homeassistant.setup:Setup failed for discovery: Could not install all requirements.
INFO:homeassistant.core:Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:

  • discovery

Please check your config., notification_id=invalid_config, service_call_id=113346320-2>
INFO:homeassistant.core:Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:

Please check your config., notification_id=invalid_config, service_call_id=113346320-3>
INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

  • discovery

Please check your config. @ 2017-11-11T18:55:32.257918+02:00>>
INFO:homeassistant.core:Bus:Handling <Event service_executed[L]: service_call_id=113346320-2>
INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

  • discovery

Please check your config. @ 2017-11-11T18:55:32.257918+02:00>, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

Please check your config. @ 2017-11-11T18:55:32.257918+02:00>>

I think Discovery doesn’t work on Windows.

On this page (https://home-assistant.io/components/discovery/) there are 2 notes:

  1. If you are on Windows and you’re using Python 3.5, download the Netifaces dependency.
  2. If you see Not initializing discovery because could not install dependency netdisco==0.6.1 in the logs, you will need to install the python3-dev or python3-devel package on your system manually (eg. sudo apt-get install python3-dev or sudo dnf -y install python3-devel). On the next restart of home-assistant, discovery should work. If you still get an error, check if you have a compiler (gcc) available on your system.

Can someone help ?

Could it be that you are using the “purge_days” parameter of the recorder component? It was replaced by"purge_interval" and “purge_keep_days” in one of the more recent Updates. (if using you need to define both.)

I am new to home assistant so I have installed yesterday the latest version for the first time.

I am actually getting this error as well. I only get it when I try to go to HADashboard though.

Nov 12 11:57:39 HAServer appdaemon[1299]: Traceback (most recent call last):
Nov 12 11:57:39 HAServer appdaemon[1299]: File “/home/homeassistant/.local/lib/python3.5/site-packages/aiohttp/web_protocol.py”, line 278, in data_received
Nov 12 11:57:39 HAServer appdaemon[1299]: messages, upgraded, tail = self._request_parser.feed_data(data)
Nov 12 11:57:39 HAServer appdaemon[1299]: File “aiohttp/_http_parser.pyx”, line 274, in aiohttp._http_parser.HttpParser.feed_data (aiohttp/_http_parser.c:4364)
Nov 12 11:57:39 HAServer appdaemon[1299]: File “aiohttp/_http_parser.pyx”, line 334, in aiohttp._http_parser.cb_on_url (aiohttp/_http_parser.c:5381)
Nov 12 11:57:39 HAServer appdaemon[1299]: File “aiohttp/_http_parser.pyx”, line 544, in aiohttp._http_parser._parse_url (aiohttp/_http_parser.c:8777)
Nov 12 11:57:39 HAServer appdaemon[1299]: File “/home/homeassistant/.local/lib/python3.5/site-packages/aiohttp/http_writer.py”, line 317, in init
Nov 12 11:57:39 HAServer appdaemon[1299]: path = yarl.quote(path, safe=’@:’, protected=’/’, strict=False)
Nov 12 11:57:39 HAServer appdaemon[1299]: File “yarl/_quoting.pyx”, line 38, in yarl._quoting._quote
Nov 12 11:57:39 HAServer appdaemon[1299]: TypeError: _quote() got an unexpected keyword argument ‘strict’

I have Yarl on 0.13.0. Everything else is working fine it seems.

To add to this, not sure if it will help but I only get the error if I run HADashboard at startup through systemd on Debian. I know the main topic is about Windows 10 but I’m thinking it may be some weird permission issue for both.

If I launch the appdaemon via the appdaemon command rather than through the systemctl launcher it works. now the systemctl launch runs the same command but for some reason it generates this error.

New to Home Assistant here too.
And on win 10 also.
I just installed all the required components thru Python and I am having the same issue as Yoni_Almog, that is: Unable to install package netdisco==1.2.3

Here is the log file I have:
2017-11-12 20:56:44 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package netdisco==1.2.3: Command “c:\users\yves\appdata\local\programs\python\python36\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\Yves\AppData\Local\Temp\pip-build-494siz7d\netifaces\setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record C:\Users\Yves\AppData\Local\Temp\pip-7r9bdoq2-record\install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in C:\Users\Yves\AppData\Local\Temp\pip-build-494siz7d\netifaces
2017-11-12 20:56:44 ERROR (MainThread) [homeassistant.setup] Not initializing discovery because could not install dependency netdisco==1.2.3
2017-11-12 20:56:44 ERROR (MainThread) [homeassistant.setup] Setup failed for discovery: Could not install all requirements.

Any help will be appreciated.
Thanks.

UPDATE
I finally found a fix.
While looking to figure out how ton install Netifaces I stumble onto a thread where a commenter mentioning the install of “… the Windows SDK which includes the 64 bit compilers necessary for building and installing the software.”
Then from one read to another, I stumbled onto this page: https://github.com/home-assistant/netdisco
I was still having issues, the compiling wouldn’t work.
Turns out I needed to install Visual C++ to have a proper compiler.
Still, some more issues.
Found this page: https://stackoverflow.com/questions/43858836/python-installing-clarifai-vs14-0-link-exe-failed-with-exit-status-1158
Following the first answer solution solved my problem.
So, maybe the Windows SDK step is not necessary but I still mention it since I did install it.
Honestly, I have no idea if it did help or not. (had to remove the link for that thread as I’m allowed only two links in this post)

Now, on to try to figure out the proper config for my tradfri setup.
It couldn’t set it up on its own, though it did see as it mentions it.
But it did recognized my Plex server, my Samsung TV and Chromecast.

Anywho, hope this info will help someone.

Cheers.