ATH-MaaS/Pixelle-Video · error · ValueError
Unsupported asset type for VLM analysis: {asset_path}
Error message
Unsupported asset type for VLM analysis: {asset_path} What it means
The asset-analysis __call__ dispatches to analyze_image or analyze_video based on the resolved asset type; when the type is neither image nor video (unknown extension or an explicitly wrong asset_type), it raises ValueError.
Source
Thrown at pixelle_video/services/api_asset_analysis.py:132
video_file = Path(video_path)
if not video_file.exists():
raise FileNotFoundError(f"Video file not found: {video_path}")
return await self._query_vlm(
prompt=prompt or self.VIDEO_PROMPT,
image_paths=[],
video_paths=[str(video_file)],
model=model,
)
async def __call__(self, asset_path: str, asset_type: Optional[str] = None, **kwargs) -> str:
path = Path(asset_path)
resolved_type = asset_type or self._get_asset_type(path)
if resolved_type == "image":
return await self.analyze_image(asset_path, **kwargs)
if resolved_type == "video":
return await self.analyze_video(asset_path, **kwargs)
raise ValueError(f"Unsupported asset type for VLM analysis: {asset_path}")
async def _query_vlm(
self,
prompt: str,
image_paths: list[str],
model: Optional[str],
video_paths: Optional[list[str]] = None,
) -> str:
from pixelle_video.services.api_services.vlm_client import VLM
selected_model = (model or "").strip()
if not selected_model:
raise RuntimeError(
"API VLM analysis requires an explicitly selected VLM model. "
"Please choose one in the asset analysis service settings."
)
logger.info(View on GitHub (pinned to 848b054e4f)
Solutions
- Convert the asset to a supported format (e.g. .png for images, .mp4 for videos) before analysis
- Pass an explicit asset_type='image' or 'video' only when it genuinely matches the file
- Check the file extension — _get_asset_type dispatches purely on suffix
- Handle non-media uploads in a different service (this service is VLM image/video only)
Example fix
# before await analyzer(asset_path="/tmp/note.pdf") # unknown type # after await analyzer(asset_path="/tmp/cover.png", asset_type="image")
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
SUPPORTED = {".jpg",".jpeg",".png",".gif",".webp",".mp4",".mov",".avi",".mkv",".webm"}
p = Path(asset_path)
if p.suffix.lower() not in SUPPORTED:
raise ValueError(f"unsupported asset extension: {p.suffix}") Type guard
IMAGE_EXTS = {".jpg",".jpeg",".png",".gif",".webp"}
VIDEO_EXTS = {".mp4",".mov",".avi",".mkv",".webm"}
def is_supported_asset(path: str) -> bool:
return Path(path).suffix.lower() in IMAGE_EXTS | VIDEO_EXTS Try / catch
try:
desc = await analyzer(asset_path, asset_type=asset_type)
except ValueError as e:
if "Unsupported asset type" in str(e):
converted = convert_to_supported_format(asset_path)
desc = await analyzer(converted)
else:
raise Prevention
- Convert/normalize uploads to supported formats (.png/.jpg images, .mp4 video) at ingestion time
- Only pass asset_type='image'|'video' and only when it matches the file
- Reject non-media uploads in your app before reaching the analysis service
When it happens
Trigger: Calling __call__ with a file whose suffix is not in image_exts (.jpg/.jpeg/.png/.gif/.webp) or video_exts (.mp4/.mov/.avi/.mkv/.webm), or passing asset_type that resolves to something other than 'image'/'video'.
Common situations: Uploading .bmp/.tiff/.heic images, .webp variants outside the set, audio files, PDFs, or files without an extension; passing asset_type='audio' or 'document'.
Related errors
- frame_template is required to determine media size
- Progress must be between 0.0 and 1.0, got {self.progress}
- No assets provided. Please upload at least one image or vide
- Unknown pipeline: '{pipeline}'. Available pipelines: {availa
- Image file not found: {image_path}
AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30).
Data as JSON: /api/errors/e4bde04cfa387a0e.
Report an issue: GitHub.