selenium-wire
selenium-wire copied to clipboard
"LookupError: unknown encoding: amz-1.0" in mitmproxy code
Using selenium-wire 4.5.6 and trying the get some data from AWS quickstart, I ran into:
Exception in thread Http2SingleStreamLayer-29:
Traceback (most recent call last):
File "aws-marketplace-ubuntu-scraper/venv/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/net/http/encoding.py", line 62, in decode
decoded = custom_decode[encoding](encoded)
KeyError: 'amz-1.0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "aws-marketplace-ubuntu-scraper/venv/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/net/http/encoding.py", line 64, in decode
decoded = codecs.decode(encoded, encoding, errors) # type: ignore
LookupError: unknown encoding: amz-1.0
Thanks for raising this.
The content encoding amz-1.0
isn't currently supported, but we can look at adding support for that. In the meantime you may be able to workaround the problem by setting the disable_encoding
option in the seleniumwire_options
.
the workaround does not change anything. I use now:
seleniumwire_options = {
'disable_encoding': True
}
driver = webdriver.Firefox(options=driver_options,
seleniumwire_options=seleniumwire_options)
Still the same problem.
@toabctl do you have a workaround for this issue ??? I am, too facing the same issue.