Describe the bug
When making a call to an instance of export server protected with HTTP basic authentication the code fails as in
|
basic_auth = requests.HTTPBasicAuth(auth_user, auth_password) |
it tries to access
HTTPBasicAuth from
requests. The class is exported by
requests.auth, as documented at:
https://requests.readthedocs.io/en/latest/user/authentication/#basic-authentication
To Reproduce
Steps to reproduce the behavior:
- When I attempt to export a chart using the following code:
chart.download_chart(
format="svg",
timeout=30,
auth_user="a username",
auth_password="a password",
)
- I receive this error:
AttributeError: module 'requests' has no attribute 'HTTPBasicAuth'
Expected behavior
The chart is downloaded and available to the calling code.
Your Environment:
- OS: MacOS
- Python Version: 3.12
- Highcharts JavaScript Version: not relevant, the javascript code is not invoked at all
Additional context:
Tested with highcharts-core 1.10.3 and requests 2.32.4
Describe the bug
When making a call to an instance of export server protected with HTTP basic authentication the code fails as in
highcharts-core/highcharts_core/headless_export.py
Line 922 in e058b4b
HTTPBasicAuthfromrequests. The class is exported byrequests.auth, as documented at: https://requests.readthedocs.io/en/latest/user/authentication/#basic-authenticationTo Reproduce
Steps to reproduce the behavior:
AttributeError: module 'requests' has no attribute 'HTTPBasicAuth'Expected behavior
The chart is downloaded and available to the calling code.
Your Environment:
Additional context:
Tested with highcharts-core 1.10.3 and requests 2.32.4