1

I have hard time in solving this problem when using Eel. I've used the free CoinGeckoAPI to display widgets in my page (using this template). Everything seemed fine until I checked the console of chrome devtools and found out these errors:

enter image description here

It seems that the error comes from this line in my index.html file (which is needed to correctly retrieve data from Coin Gecko):

<script src="https://widgets.coingecko.com/coingecko-coin-price-static-headline-widget.js"></script>

I've read many discussions about this bug, but none solve my issue. I also increased the shutdown_delay as a temporary fix just to prevent the webpage to be killed when refreshed fast enough (which also opened another problem to me). Any idea would be appreciated.

My app.py file (reduced):

import eel

#launch the webpage
try:
    x = eel.start('index.html', mode='chrome', host='localhost', port=8080, cmdline_args=['--start-maximized'], shutdown_delay=2)
except OSError:
    pass

index.html (very reduced):

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

<head>
    <!-- to enable Eel framework-->
    <script type="text/javascript" src="/eel.js"></script>

    <!-- CoinGeckoAPI widget-->
    <script src="https://widgets.coingecko.com/coingecko-coin-price-static-headline-widget.js"></script>
</head>
<body>
...
    <coingecko-coin-price-static-headline-widget coin-ids="bitcoin" currency="php" locale="en"></coingecko-coin-price-static-headline-widget>
</body>

</html>
  • Update: I managed to solve this problem a month ago. Since I couldn't find the problem, I just switched in using other related API. I guess it is because of the Coingecko API that causing error with Eel framework. – John Rey Vilbar Jan 06 '23 at 14:50

0 Answers0