Closed Yuliya-H closed 1 year ago
pynetbox
does not raise ConnectionError
s, it's some underlying module that's doing that.
Are you using the same pynetbox.api
object (= the same requests.Session
) in all those threads? I'm not a Python threading expert but I'm thinking if that could cause the responses to get messed up. See also: https://github.com/psf/requests/issues/2766
Yes , indeed I'm using one Session. I will try to separate and test this way, thanks
Everything worked OK when using separate Sessions.
Trying to allocate IP in a few threads in parallel via :
Getting ConnectionError which raises BadStatusLine error, even when IP is allocated:
One more problem here is that the HTTP status goes after the response json.