Error code 2007 (response format is not supported)

My code seems to work when using an API key from the ORS website but when using a local host with the help of SyntaxByte I get an error that the response format is not supported. What am I doing wrong? Thanks in advance:

  File "", line 160, in <module>

  File "", line 153, in main
    optimized = requests.get(client.optimization(jobs=jobs, vehicles=vehicles, geometry=True))

  File "/Users/ruben/opt/anaconda3/lib/python3.9/site-packages/openrouteservice/", line 299, in wrapper
    result = func(*args, **kwargs)

  File "/Users/ruben/opt/anaconda3/lib/python3.9/site-packages/openrouteservice/", line 97, in optimization
    return client.request("/optimization", {}, post_json=params, dry_run=dry_run)

  File "/Users/ruben/opt/anaconda3/lib/python3.9/site-packages/openrouteservice/", line 204, in request
    result = self._get_body(response)

  File "/Users/ruben/opt/anaconda3/lib/python3.9/site-packages/openrouteservice/", line 242, in _get_body
    raise exceptions.ApiError(

ApiError: 406 ({'error': {'code': 2007, 'message': 'This response format is not supported'}, 'info': {'engine': {'version': '7.0.1', 'build_date': '2023-03-08T12:06:41Z'}, 'timestamp': 1681554106308}})

See Recieving ApiError: 400 when using local host - #3 by amandus