influxdata/influxdb · error · Error::NoLine
no line protocol string provided
Error message
no line protocol string provided
What it means
The influxdb3 `write` command's `NoLine` variant is thrown when no line protocol string was supplied as the positional argument (e.g., the user passed only flags or an empty string). Distinct from NoInput in that it specifically flags the missing LP line string.
Solutions
- Ensure a non-empty quoted line protocol string is passed as the final argument
- Check the shell variable containing LP is set and non-empty
- Fall back to `--file` or stdin when the string is not available
Example fix
// before LP=""; influxdb3 write --database my-db "$LP" // after LP='cpu,host=a usage=0.5'; influxdb3 write --database my-db "$LP"
Defensive patterns
Strategy: validation
Validate before calling
// shell guard
if [[ -z "${1:-}" ]]; then
echo "line protocol string is required as final argument" >&2; exit 1
fi Prevention
- Check shell variables for emptiness before interpolation
- Always pass the LP string as the last, quoted argument
- Prefer --file/stdin for programmatic writes
When it happens
Trigger: Calling write with an empty string argument or omitting the LP positional while flags like `--database` are present and no stdin/file fallback provided input.
Common situations: Shell variable holding LP is empty (`influxdb3 write --database db "$LP"` with LP unset); scripting wrappers dropping the final argument.
Understand the failure class
Background: "no subcommand specified" and "... is required": CLI errors when a required argument is missing — this error's family across 13 libraries.
Related errors
- ensure that a single protocol line string is provided as…
- No input from stdin detected, no string was passed in, and…
- is not a valid data type, values are int64, uint64…
- All `DataPoints` must have at least one field. Builder…
- At least one field is required
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/1ef0b5c7b52931a2.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_commands/src/write.rs:41
/// `--max-http-request-size` so a `write` command piped from a generator
/// that produces a stream larger than 10 MiB still succeeds out of the box.
const DEFAULT_MAX_REQUEST_SIZE: usize = 10 * 1024 * 1024;
/// Size of each blocking `read()` from the input source (file / stdin).
const READ_SIZE: usize = 4 * 1024 * 1024;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
Client(#[from] influxdb3_client::Error),
#[error("error reading file: {0}")]
Io(#[from] io::Error),
#[error("No input from stdin detected, no string was passed in, and no file path was given")]
NoInput,
#[error("no line protocol string provided")]
NoLine,
#[error(
"ensure that a single protocol line string is provided as the final \
argument, enclosed in quotes"
)]
MoreThanOne,
}
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Parser)]
#[clap(visible_alias = "w", trailing_var_arg = true)]
pub struct Config {
/// Common InfluxDB 3 server config
#[clap(flatten)]
influxdb3_config: InfluxDb3Config,
View on GitHub (pinned to 06200ef96b)