requests-html icon indicating copy to clipboard operation
requests-html copied to clipboard

OSError: Unable to remove Temporary User Data when running multiple sessions

Open testvinder opened this issue 6 years ago • 4 comments

If a start two scripts that both use render I quickly get errors such as this (only one of them fails and the other script continues):

2018-04-07 19:24:22,339 [67136] CRITICAL root: Traceback (most recent call last): File "filename.py", line 75, in rst = function_name(param=param) File "filename.py", line 53, in function_name session.close() File "C:\Users\testvinder\Envs\backend\lib\site-packages\requests_html.py", line 686, in close self.loop.run_until_complete(self._browser.close()) File "C:\Program Files\Python36\lib\asyncio\base_events.py", line 467, in run_until_complete return future.result() File "C:\Users\testvinder\Envs\backend\lib\site-packages\pyppeteer\browser.py", line 155, in close await self._closeCallback() # Launcher.killChrome() File "C:\Users\testvinder\Envs\backend\lib\site-packages\pyppeteer\launcher.py", line 201, in killChrome self._cleanup_tmp_user_data_dir() File "C:\Users\testvinder\Envs\backend\lib\site-packages\pyppeteer\launcher.py", line 130, in _cleanup_tmp_user_data_dir raise IOError('Unable to remove Temporary User Data') OSError: Unable to remove Temporary User Data

It seems that the two independent scripts interfere with each other and try to remove files belonging to the other process.

I'm using latest version of requests-html

testvinder avatar Apr 07 '18 23:04 testvinder

Hi,

Could you please check if this still happens on version 0.10.0?

oldani avatar Feb 26 '19 14:02 oldani

Hey, same issue here. I'm using the .render() method in a script. I've updated the library but it keeps happen.

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "C:\Users\User\Anaconda3\envs\data-science\lib\site-packages\pyppeteer\launcher.py", line 262, in killChrome
    self._cleanup_tmp_user_data_dir()
  File "C:\Users\User\Anaconda3\envs\data-science\lib\site-packages\pyppeteer\launcher.py", line 154, in _cleanup_tmp_user_data_dir
    raise IOError('Unable to remove Temporary User Data')
OSError: Unable to remove Temporary User Data

nittolese avatar Feb 27 '19 11:02 nittolese

Is there a quick fix for it? I'm facing the same issue when requesting too many times

machachen avatar Aug 06 '20 09:08 machachen

Has anyone found the fix for this?

Akshatt avatar Jan 25 '21 15:01 Akshatt