matheusfelipeog / worldometer

Get live, population, geography, projected, and historical data from around the world 🌍

Home Page:https://worldometer.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue when running program

enwokoma opened this issue · comments

I have a main.py file that imports worldometer and tries to communicate with worldometer. But, when I run main.py, I get the error below

Traceback (most recent call last):
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\worldometer\core.py", line 234, in _get_html
self.__r.html.render(timeout=self.__timeout)
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\requests_html.py", line 598, in render
content, result, page = self.session.loop.run_until_complete(self._async_render(url=self.url, script=script, sleep=sleep, wait=wait, content=self.html, reload=reload, scrolldown=scrolldown, timeout=timeout, keep_page=keep_page))
File "c:\users\gigabyte\appdata\local\programs\python\python38\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\requests_html.py", line 512, in _async_render
await page.goto(url, options={'timeout': int(timeout * 1000)})
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\pyppeteer\page.py", line 885, in goto
raise error
pyppeteer.errors.TimeoutError: Navigation Timeout Exceeded: 30000 ms exceeded.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/Gigabyte/PycharmProjects/pythonProject1/main.py", line 1, in
import worldometer
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\worldometer_init_.py", line 84, in
from .api import *
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\worldometer\api.py", line 108, in
__w = Worldometer()
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\worldometer\core.py", line 181, in init
self._metrics = self.collect_metrics()
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\worldometer\core.py", line 300, in collect_metrics
html = self._get_html(url=URL)
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\worldometer\core.py", line 239, in _get_html
raise Exception(err)
Exception: Navigation Timeout Exceeded: 30000 ms exceeded.
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\pyppeteer\launcher.py", line 219, in killChrome
self._cleanup_tmp_user_data_dir()
File "C:\Users\Gigabyte\PycharmProjects\pythonProject1\venv\lib\site-packages\pyppeteer\launcher.py", line 134, in _cleanup_tmp_user_data_dir
raise IOError('Unable to remove Temporary User Data')
OSError: Unable to remove Temporary User Data

duplicate #10