Welcome to the community @AnatoliiSolomon !
English:
A noticed a few things in your code that should be addressed so you don’t have the same mistake again.
First: quotation marks.
You’ve used non-standard quotation marks (‘’) instead of the usual single (') or double (") ones. Python does not recognize these. Be sure to use the standard ones!
Second: Exposing HTTP server. (and this is related to your problem).
By default, when your Repl exposes an HTTP server, the Webview will automatically open.
You generally need to run your Flask app on host ‘0.0.0.0’ and port 5000, as this is the standard setting in Replit. So, ensure your server is being exposed correctly.
Third: keep_alive().
Make sure the keep_alive is being called!
The code that @idkwhttph provided should fix your problem but be aware of these in the future!
Russian:
Заметил несколько вещей в вашем коде, которые следует исправить, чтобы не допустить таких же ошибок в будущем.
Первое: кавычки.
Вы использовали нестандартные кавычки (‘’) вместо обычных одинарных (') или двойных ("). Python не распознает их. Убедитесь, что используете стандартные кавычки!
Второе: Открытие HTTP-сервера (и это связано с вашей проблемой).
По умолчанию, когда ваш Repl открывает HTTP-сервер, автоматически открывается Webview.
Обычно вам нужно запускать свое приложение Flask на хосте ‘0.0.0.0’ и порту 5000, так как это стандартная настройка в Replit. Убедитесь, что ваш сервер правильно открывается.
Третье: keep_alive().
Убедитесь, что вызывается функция keep_alive!
Код, предоставленный @idkwhttph, должен решить вашу проблему, но имейте в виду эти моменты в будущем!