{"record":{"id":"4473dae7f2f0b34a","repo":"pola-rs/polars","slug":"invalid-value-for-polars-upload-concurrency-s","errorCode":null,"errorMessage":"invalid value for POLARS_UPLOAD_CONCURRENCY: {s}","messagePattern":"invalid value for POLARS_UPLOAD_CONCURRENCY: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-io/src/configs.rs","lineNumber":25,"sourceCode":"            .unwrap_or_else(|_| panic!(\"invalid value for POLARS_UPLOAD_CHUNK_SIZE: {s}\"))\n    })\n}\n\npub fn env_partitioned_upload_chunk_size() -> Option<NonZeroUsize> {\n    std::env::var(\"POLARS_PARTITIONED_UPLOAD_CHUNK_SIZE\")\n        .ok()\n        .map(|s| {\n            s.parse::<NonZeroUsize>().unwrap_or_else(|_| {\n                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","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-io/src/configs.rs#L7-L43","documentation":"Panic while parsing the POLARS_UPLOAD_CONCURRENCY environment variable: the value is not a valid NonZeroUsize. Use a positive integer or unset the variable to use the default cloud-writer concurrency.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"invalid value for POLARS_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_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_UPLOAD_CONCURRENCY to a valid positive integer.","Unset the variable to use the default 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"}