Installed HA on window 10 but it wont launch

I ran python -m pip install homeassistant, it ran through its little installation and I tried running hass --open-ui which gave me this error

C:\Users\mrvog>hass --open-ui
c:\users\mrvog\appdata\local\programs\python\python35\python.exe: can’t open file ‘C:\Users\mrvog\AppData\Local\Programs\Python\Python35\Scripts\hass’: [Errno 2] No such file or directory

So I tried python -m homeassistant --open-ui which gave me this error

Unable to find configuration. Creating default one in C:\Users\mrvog\AppData\Roaming.homeassistant
Traceback (most recent call last):
File “C:\Users\mrvog\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant_main_.py”, line 388, in
sys.exit(main())
File “C:\Users\mrvog\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant_main_.py”, line 380, in main
exit_code = setup_and_run_hass(config_dir, args)
File “C:\Users\mrvog\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant_main_.py”, line 289, in setup_and_run_hass
config_file = ensure_config_file(config_dir)
File “C:\Users\mrvog\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant_main_.py”, line 110, in ensure_config_file
config_path = config_util.ensure_config_exists(config_dir)
File “C:\Users\mrvog\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\config.py”, line 135, in ensure_config_exists
config_path = create_default_config(config_dir, detect_location)
File “C:\Users\mrvog\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\config.py”, line 166, in create_default_config
location_info.longitude)
File “C:\Users\mrvog\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\util\location.py”, line 78, in elevation
return int(float(req.json()[‘results’][0][‘elevation’]))
IndexError: list index out of range

Seems to be a duplicate of

yeah i tried py -m homeassistant --open-ui

and it also results in the second error regarding the configuration file

Could you try to add elevation to you config?

i dont think i have a config file. it always trys to make it because it cant find one, but is unable to

Hope you are opening the command with ‘Run as administrator’ option.

Just in case you don’t know how to:

Search for ‘Command Prompt’, when it appears in search result, right click on it and select ‘Run as administrator’ option.

In addition, why not create a simple standard file and place it in a folder, as described here

Should you face any issues getting one, please post back!

Hope it helps!

yeah I am running command with admin rights. I noticed on the youtube windows install video there was like 3 other people with the same error. I created a configuration file based on the file daniel pointed me to, and at first it had errors regarding longitude and lat, so I put in my long and lat, it then didnt try to create a file, but it had a huge list of errors and still wouldnt launch the program

my honest advice? Get a raspberry pi 3, around 70 euro. It makes all the debugging more easily supported

I have some small Linux boxes I might try it on. I was just going to play with it on my main computer since it could be installed on windows.

I started as you did. But the debugging is intensive, and if you run on linux I think (at least it was for me) you get better answers from the forum members

While I am not expert at it, would be nice if you could post the relevant portion. I am aware that it all gets flooded. Preferably put it in a text file and attach (if possible). No harm having a look, I guess.

Configure suggested by Daniel has things like !include, which you may not have.

I suggest you use one given here. Modify later after you succeed.

I am not running it continuously, but have been running it without issues on Windows 10 for over a month now.

My plan is to have a fairly complete config on PC where I am comfortable and then migrate the whole stuff onto RPi for continuous running with battery backed power supply.

1 Like

I do not use Windows, but see this questions sometimes: What is the correct command to start HASS on windows?

hass --open-ui
or
python -m homeassistant --open-ui

The second one definitely. Actually I never tried first one because I was following video tutorial on YouTube.

I will try first after going home and report back.

I can confirm that the first command doesn’t work, at least in the environment I have. I am getting following error:

c:\users\comp\appdata\local\programs\python\python35\python.exe: can't open file 'C:\Users\comp\AppData\Local\Programs\Python\Python35\Scripts\hass': [Errno 2] No such file or directory

The second works as mentioned before.

@nitinsontakke could you confirm that you have file: C:\Users\comp\AppData\Local\Programs\Python\Python35\Scripts\hass.exe
even if it doesn’t work?

Sure! I am in the office at the moment (India). Will post when back home.

Considering it is Friday today, I don’t know in what state I will be at home.

I can confirm that the file hass.exe is very much there! Should you need any other info, please do let me know.

@nitinsontakke, thank you.

Let’s see if someone is able to figure out what is wrong that the script doesn’t work.