Write_points stopped working, was working two days ago

I have python3 script that measure internet speed and for some reason it stopped working two days ago.

Any idea why I am getting error? Thanks.

Code snippet:

speed_data = [
{
“measurement” : “internet_speed”,
“tags” : {
“host”: “host”
},
“fields” : {
“download”: float(download),
“upload”: float(upload),
“ping”: float(ping)
}
}
]

client = InfluxDBClient(‘localhost’, 8086, ‘speedtest’, ‘password’, ‘speedtest’)
client.write_points(speed_data)

Error:
Traceback (most recent call last):
File “speedtest.py”, line 45, in
client.write_points(speed_data)
File “/usr/lib/python3/dist-packages/influxdb/client.py”, line 490, in write_points
tags=tags, protocol=protocol)
File “/usr/lib/python3/dist-packages/influxdb/client.py”, line 551, in _write_points
protocol=protocol
File “/usr/lib/python3/dist-packages/influxdb/client.py”, line 327, in write
headers=headers
File “/usr/lib/python3/dist-packages/influxdb/client.py”, line 267, in request
timeout=self._timeout
File “/home/bukid/.local/lib/python3.7/site-packages/requests/sessions.py”, line 279, in request
resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
File “/home/bukid/.local/lib/python3.7/site-packages/requests/sessions.py”, line 374, in send
r = adapter.send(request, **kwargs)
File “/home/bukid/.local/lib/python3.7/site-packages/requests/adapters.py”, line 174, in send
timeout=timeout
File “/home/bukid/.local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py”, line 417, in urlopen
conn = self._get_conn(timeout=pool_timeout)
File “/home/bukid/.local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py”, line 232, in _get_conn
return conn or self._new_conn()
File “/home/bukid/.local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py”, line 199, in _new_conn
strict=self.strict)
TypeError: init() got an unexpected keyword argument ‘strict’

I would try upgrading the requests package:

pip install --upgrade requests
1 Like

Your suggested solution worked! Thanks.