{"record":{"id":"05ac03f8bc07af9b","repo":"pola-rs/polars","slug":"invalid-value-for-polars-partitioned-upload-concur","errorCode":null,"errorMessage":"invalid value for POLARS_PARTITIONED_UPLOAD_CONCURRENCY: {s}","messagePattern":"invalid value for POLARS_PARTITIONED_UPLOAD_CONCURRENCY: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-io/src/configs.rs","lineNumber":34,"sourceCode":"                panic!(\"invalid value for POLARS_PARTITIONED_UPLOAD_CHUNK_SIZE: {s}\")\n            })\n        })\n}\n\n/// Max concurrent tasks within a single cloud writer.\npub fn env_upload_concurrency() -> Option<NonZeroUsize> {\n    std::env::var(\"POLARS_UPLOAD_CONCURRENCY\").ok().map(|s| {\n        s.parse::<NonZeroUsize>()\n            .unwrap_or_else(|_| panic!(\"invalid value for POLARS_UPLOAD_CONCURRENCY: {s}\"))\n    })\n}\n\npub fn env_partitioned_upload_concurrency() -> Option<NonZeroUsize> {\n    std::env::var(\"POLARS_PARTITIONED_UPLOAD_CONCURRENCY\")\n        .ok()\n        .map(|s| {\n            s.parse::<NonZeroUsize>().unwrap_or_else(|_| {\n                panic!(\"invalid value for POLARS_PARTITIONED_UPLOAD_CONCURRENCY: {s}\")\n            })\n        })\n}\n\n/// Runs of this many values whose total bytes are <= `copy_buffer_reserve_size` will be copied into\n/// a single contiguous chunk.\npub(crate) fn cloud_writer_coalesce_run_length() -> usize {\n    return *COALESCE_RUN_LENGTH;\n\n    static COALESCE_RUN_LENGTH: LazyLock<usize> = LazyLock::new(|| {\n        let mut v: usize = 64;\n\n        if let Ok(s) = std::env::var(\"POLARS_CLOUD_WRITER_COALESCE_RUN_LENGTH\") {\n            v = s\n                .parse::<usize>()\n                .ok()\n                .filter(|x| *x >= 2)\n                .unwrap_or_else(|| {","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-io/src/configs.rs#L16-L52","documentation":"Raised in env_partitioned_upload_concurrency() when POLARS_PARTITIONED_UPLOAD_CONCURRENCY is set to a string that does not parse as a NonZeroUsize. It is an env-var parse guard for the number of concurrent tasks allowed in a partitioned cloud writer.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"invalid value for POLARS_PARTITIONED_UPLOAD_CONCURRENCY: {s}\". Typical triggers: unsupported dtype or feature-gated code path reached at runtime, invalid user input or environment variable value, calling API methods in the wrong order or on mismatched types, or data (lengths, offsets, ranges) violating the function's preconditions.","commonSituations":"Encountered when input data or configuration does not meet the preconditions of the throwing code path (\"invalid value for POLARS_PARTITIONED_UPLOAD_CONCURRENCY: {s}\"). Common cases: missing Cargo feature flags, mismatched dtypes/lengths between arrays or series, out-of-range temporal values, malformed environment variables, or operations on unsupported/complex nested types.","solutions":["Set POLARS_PARTITIONED_UPLOAD_CONCURRENCY to a valid positive integer.","Unset the variable to use the default partitioned upload concurrency."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b5d73fd00236295624374b075d16b1fe6ec6df9","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}