arsenic
arsenic copied to clipboard
Dict in get_screenshot method
When I try to call method Session.get_screenshot()
:
python_1 | File "/usr/local/lib/python3.7/site-packages/arsenic/session.py", line 300, in get_screenshot
python_1 | base64.b64decode(await self._request(url="/screenshot", method="GET"))
python_1 | File "/usr/local/lib/python3.7/base64.py", line 80, in b64decode
python_1 | s = _bytes_from_decode_data(s)
python_1 | File "/usr/local/lib/python3.7/base64.py", line 46, in _bytes_from_decode_data
python_1 | "string, not %r" % s.__class__.__name__) from None
python_1 | TypeError: argument should be a bytes-like object or ASCII string, not 'dict'
I guess it is dict in data
returned from RequestHelpers.connection.request()
.
Response is:
{
"message": "invalid session id\n (Driver info: chromedriver=73.0.3683.75,platform=Linux 5.4.0-65-generic x86_64)"
}
That's not good 😆
@FRiMN could you provide a MRE?
I was not able to reproduce, I've tried the newest versions:
- ChromeDriver 89.0.4389.23 (61b08ee2c50024bab004e48d2b1b083cdbdac579-refs/branch-heads/4389@{#294})
- arsenic==20.9
- aiohttp==3.7.4.post0
I've added xx = await driver.get_screenshot()
to a random existing test that uses arsenic
and that produced a valid io.BytesIO
with sane length.
I'm considering to close this...