Running my code with version 2.8.0 instead of 2.7.0 fails with the following error message. Is there some change I need to do when transferring to the new version?
Traceback (most recent call last):
File "/opt/scripts/create_layers.py", line 104, in <module>
main(
File "/opt/scripts/create_layers.py", line 29, in main
datastores = geo.get_datastores(workspace=workspace)
File "/usr/local/lib/python3.10/dist-packages/geo/Geoserver.py", line 478, in get_datastores
r = self._requests("get", url, auth=(self.username, self.password))
File "/usr/local/lib/python3.10/dist-packages/geo/Geoserver.py", line 171, in _requests
return requests.get(url, auth=(self.username, self.password), **kwargs, **self.request_options)
TypeError: requests.api.get() got multiple values for keyword argument 'auth'
This is the code snippet that fails (at the last line). It works when I switch back to 2.7.0 but I would like to use the request_options (commented now).
geo = Geoserver(
url, username=username, password=password,
# request_options={'timeout': timeout}
)
# create workspace
workspaces = geo.get_workspaces()
if workspace not in workspaces.keys():
print('create workspace')
geo.create_workspace(workspace=workspace)
# create store
datastores = geo.get_datastores(workspace=workspace)
Running my code with version 2.8.0 instead of 2.7.0 fails with the following error message. Is there some change I need to do when transferring to the new version?
This is the code snippet that fails (at the last line). It works when I switch back to 2.7.0 but I would like to use the
request_options
(commented now).