Проблема с eel, не может найти файл

Помогите пожалуйста с решением проблемы.

Есть код python:

import eel

eel.init("python")


@eel.expose
   def cls_func(cls):
      if (cls == '5'):
         print('YO')


eel.start("index.html", size=(500, 500))

Содержимое index.html:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="eel.js"></script>
    <title>Document</title>
</head>

<body>
    <div class="bcls_block">
        <button class="option_1" id="option_1">button</button>
        <button class="option_2" id="option_2">button</button>
        <button class="option_3" id="option_3">button</button>
    </div>
</body>
<script>
    async function class_func(cls) {
        await eel.cls_func(cls)
    }

    option_1.addEventListener('click', function() {
        class_func('5');
    })
</script>

</html>

Дело в том, что у меня не запускается файл index.html. При запуске .py файла показывается окошко с сообщением:

Error: 404 Not Found
Sorry, the requested URL 'http://localhost:8000/index.html' caused an error:

File does not exist.

Знаю, что проблема уже здесь обсуждалась. Кроме того, eel установлен, импортируется и запускается, но тем не менее не может найти этот файл. Интересно есть то, что я ранее работал с eel, и с другой директории он работает, всё нормально запускается. Здесь же, когда я решил запустить новый файл с другой директории - ничего не произошло.

В чём может быть проблема?


Ответы (0 шт):