You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using pynautobot 1.1.0 with nautobot 1.3.1 and trying to insert a new cable entry but it errors. The same works with pynautobot 1.0.4 (with nautobot 1.3.1)
File "/home/appuser/.local/lib/python3.8/site-packages/pynautobot/core/endpoint.py", line 293, in create
req = Request(
File "/home/appuser/.local/lib/python3.8/site-packages/pynautobot/core/query.py", line 339, in post
return self._make_call(verb="post", data=data)
File "/home/appuser/.local/lib/python3.8/site-packages/pynautobot/core/query.py", line 241, in _make_call
raise RequestError(req)
pynautobot.core.query.RequestError: The request failed with code 406 Not Acceptable: {'detail': 'Invalid version in "Accept" header. Supported versions are 1.2, 1.3'}
I'm getting up pynautobot with the following:
nautobot = nb_api(url=nb_url, token=nb_token)
I have tried to add api_version="1.3" but it fails with the same.
Doing some debugging if I edit pynautobot/core/query.pyand print the headers in _make_call after if self.api_version: I see the following:
I'm using pynautobot 1.1.0 with nautobot 1.3.1 and trying to insert a new cable entry but it errors. The same works with pynautobot 1.0.4 (with nautobot 1.3.1)
Example code:
This errors with:
I'm getting up pynautobot with the following:
I have tried to add
api_version="1.3"
but it fails with the same.Doing some debugging if I edit
pynautobot/core/query.py
and print the headers in _make_call afterif self.api_version:
I see the following:So it looks like the headers are getting mangled with the post data.
If I revert to 1.0.4 everything is fine, the headers are normal:
The text was updated successfully, but these errors were encountered: