{"record":{"id":"3133c2f66de2d902","repo":"pola-rs/polars","slug":"invalid-value-for-polars-ndjson-chunk-size-x","errorCode":null,"errorMessage":"invalid value for POLARS_NDJSON_CHUNK_SIZE: {x}","messagePattern":"invalid value for POLARS_NDJSON_CHUNK_SIZE: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-stream/src/nodes/io_sources/ndjson/mod.rs","lineNumber":430,"sourceCode":"        let row_skipper = RowSkipper {\n            cfg_n_rows_to_skip: n_rows_to_skip,\n            n_rows_skipped: 0,\n            is_line: self.chunk_reader_builder.is_line_fn(),\n            reverse: is_negative_slice,\n        };\n\n        // Unify the two source options (uncompressed local file mmapp'ed, or streaming async with\n        // transparent decompression), into one unified reader source.\n        let reader_source = if use_async_prefetch {\n            // Prepare parameters for Prefetch task.\n            // TODO REFACTOR: use get_streaming_chunk_size()\n            const DEFAULT_NDJSON_CHUNK_SIZE: usize = 32 * 1024 * 1024;\n            let memory_prefetch_func = get_memory_prefetch_func(verbose);\n            let chunk_size = std::env::var(\"POLARS_NDJSON_CHUNK_SIZE\")\n                .map(|x| {\n                    x.parse::<NonZeroUsize>()\n                        .unwrap_or_else(|_| {\n                            panic!(\"invalid value for POLARS_NDJSON_CHUNK_SIZE: {x}\")\n                        })\n                        .get()\n                })\n                .unwrap_or(DEFAULT_NDJSON_CHUNK_SIZE);\n\n            let prefetch_limit = self\n                .chunk_prefetch_sync\n                .prefetch_limit\n                .min(file_size.div_ceil(chunk_size))\n                .max(1);\n\n            let (prefetch_send, prefetch_recv) = tokio::sync::mpsc::channel(prefetch_limit);\n\n            // Task: Prefetch.\n            // Initiate parallel downloads of raw data chunks.\n            let byte_source = byte_source.clone();\n            let prefetch_task = {\n                let prefetch_semaphore = Arc::clone(&self.chunk_prefetch_sync.prefetch_semaphore);","sourceCodeStart":412,"sourceCodeEnd":448,"githubUrl":"https://github.com/pola-rs/polars/blob/5d8ebabf11caea54a5c29178a64a058762f49766/crates/polars-stream/src/nodes/io_sources/ndjson/mod.rs#L412-L448","documentation":"Environment-variable parsing guard in the streaming NDJSON source: the POLARS_NDJSON_CHUNK_SIZE override was set to a value that cannot be parsed as the expected integer type. The env var's raw value is the faulty input.","triggerScenarios":"Invalid value in POLARS_NDJSON_CHUNK_SIZE.","commonSituations":"See trigger scenarios.","solutions":["Set POLARS_NDJSON_CHUNK_SIZE to a positive integer or unset it."],"exampleFix":"export POLARS_NDJSON_CHUNK_SIZE=8192","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5d8ebabf11caea54a5c29178a64a058762f49766","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}