Skip to content

pyppeteer Network.setExtraHTTPHeaders #1

@RadFam

Description

@RadFam

Hello!

Thanks a lot for your Medium article about chatbot with AI model inside it! But when I've tried to launch this project locally (Ubuntu 22.04) and from the docker container, I caught such error from pyppeteer:

Traceback (most recent call last):
File "summary_bot/bot.py", line 28, in get_summary
article = await extract_article(user_input)
File "/opt/app/summary_bot/scraper.py", line 31, in extract_article
page: Page = await scraper.get_response(url)
File "/opt/app/summary_bot/scraper.py", line 99, in get_response
_ = await asyncio.wait_for(
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
return fut.result()
File "/usr/local/lib/python3.8/site-packages/pyppeteer/page.py", line 634, in setExtraHTTPHeaders
return await self.networkManager.setExtraHTTPHeaders(headers)
File "/usr/local/lib/python3.8/site-packages/pyppeteer/network
manager.py", line 83, in setExtraHTTPHeaders
await self._client.send('Network.setExtraHTTPHeaders',
File "/usr/local/lib/python3.8/site-packages/pyppeteer/connection.py", line 217, in send
raise NetworkError(
pyppeteer.errors.NetworkError: Protocol Error (Network.setExtraHTTPHeaders): Session closed. Most likely the page has been closed.

I had tried different urls, change chrome and chromium in settings, but this error always reproduced. Do you have any idea, what can cause it, and does the system need any other installed modules, except for those that are in requirements file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions