Closed ronytigo closed 1 year ago
Hi,
init() got an unexpected keyword argument 'method_whitelist'
This error generally means that you provided a keyword argument "method_whitelist" into a function, but that function does not know what to do with that argument. I did not see "method_whitelist" anywhere in the code.
Client Version: 1.24.0
This is pretty old, I would suggest updating to v1.36.0 in case this was an issue on a previous version.
it's on write_api.py:
def to_retry_strategy(self, **kwargs):
"""
Create a Retry strategy from write options.
:key retry_callback: The callable ``callback`` to run after retryable error occurred.
The callable must accept one argument:
- `Exception`: an retryable error
"""
return WritesRetry(
total=self.max_retries,
retry_interval=self.retry_interval / 1_000,
jitter_interval=self.jitter_interval / 1_000,
max_retry_delay=self.max_retry_delay / 1_000,
max_retry_time=self.max_retry_time / 1_000,
exponential_base=self.exponential_base,
retry_callback=kwargs.get("retry_callback", None),
method_whitelist=["POST"])
I'll try the newer version.
Specifications
Code sample to reproduce problem
Expected behavior
write to influxdb
Actual behavior
2023-05-29 21:20:49,555 - influxdb_client.client.write_api - ERROR - 539 - write_api.py - The batch item wasn't processed successfully because: init() got an unexpected keyword argument 'method_whitelist' 2023-05-29 21:20:49,556 - influxdb - ERROR - 84 - init.py - Cannot write batch: ...
Additional info
No response