Javascript I';我正在学习python和JS。试图编写应用程序来显示天气。但加载资源失败时出错:net::ERR\u文件未找到

Javascript I';我正在学习python和JS。试图编写应用程序来显示天气。但加载资源失败时出错:net::ERR\u文件未找到,javascript,python,html,jquery,tkinter,Javascript,Python,Html,Jquery,Tkinter,错误类型: Failed to load resource: net::ERR_FILE_NOT_FOUND main.html:27 Uncaught (in promise) ReferenceError: eel is not defined at display_weather (main.html:27) at HTMLButtonElement.<anonymous> (main.html:32) at HTMLButtonElement.disp

错误类型:

Failed to load resource: net::ERR_FILE_NOT_FOUND
main.html:27 Uncaught (in promise) ReferenceError: eel is not defined
    at display_weather (main.html:27)
    at HTMLButtonElement.<anonymous> (main.html:32)
    at HTMLButtonElement.dispatch (jquery.min.js:2)
    at HTMLButtonElement.v.handle (jquery.min.js:2)

有人说我必须上传eel文件和这些文件,但是我应该从哪里获得这些文件呢?有些人说我应该下载,但我已经通过cmd下载了。顺便说一下,我用的是LinuxMint20。谢谢

为什么要注释Python文件中所需的最后两行?另外,在
def get_weather(place)
行中将
place
更改为
city
。在
index.html
中,
应该是
。因为这是在视频中显示的,所以我做了完全相同的事情。也试着写这两行评论,现在,我没有工作。我照你的建议做了,没用。同样的错误我已经测试了你的代码(使用我的修复建议),它工作正常。你是否直接在浏览器中打开了
index.html
文件?如果是的话,那么它会有上面提到的错误。是的,我不能以不同的方式打开它,直到我有错误,我不能通过cmd运行它。我照你说的做了,但这对我没有帮助,错误并没有消失。有人说我应该通过服务器运行它,我正在寻找如何做到这一点。
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Weather by Alibek</title>


    <script type="text/javascript" src="/eel.js"></script>
    <link rel="stylesheet" type="image/png" href="weather-icon.png">
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>

    <input id="location" type="text" placeholder="Write the name of your Country ot City" required="" value="Bukhara, Uzbekistan">

    <button id ="show">Know the weather</button>

    <div id="info ">
        
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script type="text/javascript">

        async function display_weather(){
            let place = document.getElementById('location').value;

            let res = await eel.get_weather(place)();
            document.getElementById('info').innerHTML = res;
        }

        jQuery('#show').on('click', function(){
            display_weather();
        });

    </script>

</body>
</html>
import eel
import pyowm


own = pyowm.OWM('d845c8640738fe82515cb1277bb3dd38')

@eel.expose
def get_weather(place):

    mgr = own.weather_manager()

    observation = mgr.weather_at_place(city)
    w = observation.weather 

    temp = w.temperature('celsius')['temp']

    return city + ' ' +  str(temp)

#eel.init('web')
#eel.start('index.html', size=(700, 700))