I
I
IM_NIK2020-08-23 14:02:03
Python
IM_NIK, 2020-08-23 14:02:03

Does an error occur when converting a python program using eel to exe?

I created this python script:

import eel 
import pyowm
# api key
owm = pyowm.OWM ( '80e8e723ef945c291f4661f5898f93e0',language = "RU" )
@eel.expose
def get_weather(place):
    #owm
    observation = owm.weather_at_place(place)
    Observation = weather = observation.get_weather()
    #temp
    Temp = weather.get_temperature('celsius')['temp']
    #status
    Status = weather.get_detailed_status()
    return "В городе "+place+' температура '+str(Temp)+' °С ,' + Status

#eel
eel.init("web")
eel.start("main.html", size=(500 , 550))

it works properly.
But when converting to exe with pyinstaller, an error occurs
Error: 404 Not Found
Sorry, the requested URL 'http://localhost:8000/main.html' caused an error:

File does not exist.

Also I used auto_py_to_exe and
it didn't help either.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Karbivnichy, 2020-08-23
@hottabxp

How to make pyinstaller take everything with it...

I
IM_NIK, 2020-08-23
@IM_NIK

I have to convert to a single file and not with separate pieces such as html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question