Closed blcoffee closed 10 months ago
I wasn't able to replicate issue using said versions of influxdb client and influxdb on linux nor windows. Using above snippets write goes through but is duplicated. Write works fine without netmiko import. As it seems there is no indication that problem is on our side. Try contancting netmiko for fix if you want to use their library.
i meet the same issue, without using netmiko.
it seems that "influxdb_client/_sync/api_client.py", line 661, in :func:_signout
could not find :func:_requires_expire_user_session
correctly.
i just copy :func:_requires_expire_user_session
from "influxdb_client/rest.py" to :func:_signout
as an inner function, then fix the TypeError Execption. :func:_signout
seems to be like:
def _signout(self):
def _requires_expire_user_session(configuration: Configuration, cookie: str):
return configuration.username and configuration.password and cookie
if _requires_expire_user_session(self.configuration, self.cookie):
SignoutService(self).post_signout()
self.cookie = None
Client Version: 1.38.0 InfluxDB Version: v2.7.1 Platform: Linux Python Version: 3.11
Also import pymongo before initializing write_client and write_api
Specifications
Code sample to reproduce problem
Expected behavior
write the vaule get via netmiko to DB without error.
Actual behavior
If I import netmiko I will get this error:
Additional info
The workaround is put "import netmiko" after write_client.write_api(write_options=SYNCHRONOUS) and we won't get an error.