pyppeteer 异常 ValueError: signal only works in main thread

When creating a child thread in flask and calling the pyppeteer program, an error is reported ValueError: signal only works in main thread

Literally translated 

 Solution

Add three fields when creating the browser object

'handleSIGINT':False,
'handleSIGTERM': False,
'handleSIGHUP': False,

Here are others' answers https://stackoverflow.com/questions/53679905/running-pypupeteer-in-flask-gives-valueerror-signal-only-works-in-main-thread?r=SearchResults

Guess you like

Origin blog.csdn.net/weixin_41822224/article/details/107490001