{"record":{"id":"2aeec55e94e91985","repo":"windmill-labs/windmill","slug":"could-not-generate-polars-s3-connection-settings-f","errorCode":null,"errorMessage":"Could not generate Polars S3 connection settings from the provided resource","messagePattern":"Could not generate Polars S3 connection settings from the provided resource","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"python-client/wmill/wmill/client.py","lineNumber":889,"sourceCode":"    def get_polars_connection_settings(\n        self,\n        s3_resource_path: str = \"\",\n    ) -> PolarsConnectionSettings:\n        \"\"\"\n        Convenient helpers that takes an S3 resource as input and returns the settings necessary to\n        initiate an S3 connection from Polars\n        \"\"\"\n        s3_resource_path = parse_resource_syntax(s3_resource_path) or s3_resource_path\n        try:\n            raw_obj = self.post(\n                f\"/w/{self.workspace}/job_helpers/v2/polars_connection_settings\",\n                json={}\n                if s3_resource_path == \"\"\n                else {\"s3_resource_path\": s3_resource_path},\n            ).json()\n            return PolarsConnectionSettings(raw_obj)\n        except JSONDecodeError as e:\n            raise Exception(\n                \"Could not generate Polars S3 connection settings from the provided resource\"\n            ) from e\n\n    def get_boto3_connection_settings(\n        self,\n        s3_resource_path: str = \"\",\n    ) -> Boto3ConnectionSettings:\n        \"\"\"\n        Convenient helpers that takes an S3 resource as input and returns the settings necessary to\n        initiate an S3 connection using boto3\n        \"\"\"\n        s3_resource_path = parse_resource_syntax(s3_resource_path) or s3_resource_path\n        try:\n            s3_resource = self.post(\n                f\"/w/{self.workspace}/job_helpers/v2/s3_resource_info\",\n                json={}\n                if s3_resource_path == \"\"\n                else {\"s3_resource_path\": s3_resource_path},","sourceCodeStart":871,"sourceCodeEnd":907,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/python-client/wmill/wmill/client.py#L871-L907","documentation":"get_polars_connection_settings() converts an S3 resource into Polars storage settings via a server endpoint; a non-JSON response (JSONDecodeError) is re-raised with this message. It means the server could not produce valid settings for the given S3 resource.","triggerScenarios":"get_polars_connection_settings(s3_resource_path='...') with a nonexistent/mistyped resource path, a non-S3 resource, missing workspace S3 configuration, or a server error returning a non-JSON error body.","commonSituations":"Wrong workspace context; resource path typo; S3 resource credentials invalid so the settings endpoint fails; calling from a context where the resource isn't accessible.","solutions":["Confirm the resource path and its s3 type in the workspace Resources page.","Inspect the server response/log for the underlying error body.","Try the default resource by passing s3_resource_path=''.","Fix the S3 resource's credentials/configuration in the workspace."],"exampleFix":"// before\nsettings = client.get_polars_connection_settings(s3_resource_path='s3_res/typo_name')\n// after\nsettings = client.get_polars_connection_settings(s3_resource_path='u/admin/s3_prod')  # verified path","handlingStrategy":"validation","validationCode":"def s3_resource_exists(client, path):\n    if not path:\n        return True\n    resources = client.get(f'/w/{client.workspace}/resources/list').json()\n    return any(r['path'] == path and r['resource_type'] == 's3' for r in resources)","typeGuard":null,"tryCatchPattern":"try:\n    settings = client.get_polars_connection_settings(s3_resource_path=path)\nexcept Exception as e:\n    if 'Polars S3 connection settings' in str(e):\n        raise RuntimeError(f'S3 resource {path!r} invalid or missing; check workspace resources') from e\n    raise","preventionTips":["Validate the resource exists and is s3-typed before the call.","Use the default resource ('') when applicable.","Check server logs when the wrapped exception appears to find the real cause."],"tags":["polars","s3","resources","python"],"backgroundTag":"invalid-resource-configuration","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}