influxdata/influxdb · warning · PluginEnvironmentError
Failed to list packages
Error message
Failed to list packages: {0} What it means
PluginEnvironmentError::PackageListFailed is thrown when the environment manager fails to list installed packages in a plugin's Python environment (e.g. output of pip list could not be obtained or parsed). It carries a String describing the failure.
Solutions
- Check the String detail to see whether the listing command failed or its output was unparseable
- Recreate the plugin's virtual environment (delete and re-run environment setup)
- Ensure pip is installed and functional inside the venv (python -m ensurepip --upgrade)
- Pin a pip version whose `pip list` output format the manager supports
Example fix
# before: listing fails due to missing pip python3 -m venv /path/venv # after python3 -m venv /path/venv && /path/venv/bin/python -m ensurepip --upgrade /path/venv/bin/pip list
Defensive patterns
Strategy: retry
Validate before calling
# ensure pip works in the plugin venv before listing packages
"$VENV/bin/python" -m pip --version >/dev/null 2>&1 \
|| { echo 'pip unavailable in venv'; "$VENV/bin/python" -m ensurepip --upgrade; } Try / catch
match env_manager.list_packages(plugin).await {
Err(PluginEnvironmentError::PackageListFailed(detail)) => {
eprintln!("package listing failed: {detail}; recreating venv");
recreate_venv(plugin).await?;
env_manager.list_packages(plugin).await
}
ok => ok,
} Prevention
- Ensure pip is installed and healthy inside each plugin venv
- Recreate venvs that were interrupted mid-creation
- Pin pip versions known to work with the environment manager's parser
- Monitor venv directory integrity and disk space
When it happens
Trigger: Calling the environment manager's package-listing operation for a plugin venv where the listing command fails to run or returns unusable output.
Common situations: pip missing or broken inside the venv; venv deleted or corrupted after creation; pip output format changed by a pip version upgrade breaking parsing; low disk or permissions causing pip to fail.
Related errors
- UnexpectedEOF
- Virtual environment error
- call site contains null bytes
- Connection error
- External call failed
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/1df5f2c51f5db651.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_processing_engine/src/environment.rs:25
use std::fmt::Debug;
use std::path::{Path, PathBuf};
use std::process::Command;
use std::sync::{Arc, OnceLock};
use thiserror::Error;
#[derive(Error, Debug)]
pub enum PluginEnvironmentError {
#[error("Package manager not available: {0}")]
PackageManagerNotFound(String),
#[error("External call failed: {0}")]
InstallationFailed(#[from] std::io::Error),
#[error("Plugin environment management is disabled")]
PluginEnvironmentDisabled,
#[error("Virtual environment error: {0}")]
VenvError(#[from] VenvError),
#[error("Failed to list packages: {0}")]
PackageListFailed(String),
#[error(
"Package installation has been disabled. Contact your administrator for more information."
)]
PackageInstallationDisabled,
}
pub trait PythonEnvironmentManager: Debug + Send + Sync + 'static {
fn init_pyenv(
&self,
plugin_dir: Option<&Path>,
virtual_env_location: Option<&PathBuf>,
) -> Result<(), PluginEnvironmentError>;
fn install_packages(&self, packages: Vec<String>) -> Result<(), PluginEnvironmentError>;
fn install_requirements(&self, requirements_path: String)
-> Result<(), PluginEnvironmentError>;View on GitHub (pinned to 06200ef96b)