apache/superset · error · DatabaseUploadFailed
Unexpected no file extension found
Error message
Unexpected no file extension found
What it means
DatabaseUploadFailed ('Unexpected no file extension found') raised in ColumnarReader._yield_files when Path(file.filename).suffix is empty. The Columnar reader dispatches on the file extension (zip vs single Parquet), so a file with no extension cannot be routed and the upload is rejected before any parsing.
Source
Thrown at superset/commands/database/uploaders/columnar_reader.py:87
) as ex:
raise DatabaseUploadFailed(
message=_("Parsing error: %(error)s", error=str(ex))
) from ex
except Exception as ex:
raise DatabaseUploadFailed(_("Error reading Columnar file")) from ex
@staticmethod
def _yield_files(file: FileStorage) -> Generator[IO[bytes], None, None]:
"""
Yields files from the provided file. If the file is a zip file, it yields each
file within the zip file. If it's a single file, it yields the file itself.
:param file: The file to yield files from.
:return: A generator that yields files.
"""
file_suffix = Path(file.filename).suffix
if not file_suffix:
raise DatabaseUploadFailed(_("Unexpected no file extension found"))
file_suffix = file_suffix[1:] # remove the dot
if file_suffix == "zip":
if not is_zipfile(file):
raise DatabaseUploadFailed(_("Not a valid ZIP file"))
try:
with ZipFile(file) as zip_file:
# guard against decompression bombs before reading entries,
# mirroring the importer path
try:
check_is_safe_zip(zip_file)
except SupersetException as ex:
raise DatabaseUploadFailed(str(ex)) from ex
# check if all file types are of the same extension
file_suffixes = {Path(name).suffix for name in zip_file.namelist()}
if len(file_suffixes) > 1:
raise DatabaseUploadFailed(
_("ZIP file contains multiple file types")
)View on GitHub (pinned to f4587218dd)
Solutions
- Rename the file to include the correct extension, e.g. data.parquet (or data.zip for archives)
- If uploading programmatically, set the multipart filename explicitly: files={'file': ('data.parquet', fh, 'application/octet-stream')}
- Validate the extension client-side before starting the upload
Example fix
# before curl -F 'file=@/tmp/tmp8123' ... # after curl -F 'file=@/tmp/tmp8123;filename=data.parquet' ...
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def has_extension(filename: str | None) -> bool:
return bool(filename and Path(filename).suffix) Prevention
- Always name uploads with the real extension (.parquet/.zip)
- Set multipart filename explicitly in API clients
- Client-side check: reject files without a suffix before POSTing
When it happens
Trigger: Uploading a file whose Flask FileStorage filename has no dot-separated suffix, e.g. 'data', 'output', or a client that sends filename without extension; also filenames ending in a dot ('data.') yield an empty suffix.
Common situations: Programmatic API uploads (POST to /api/v1/database/<id>/upload/ with form-data) where the filename field is omitted or set to a bare name; temp files renamed without extension; some browsers/SDKs defaulting to blob filenames.
Related errors
- Parsing error: %(error)s
- Error reading Columnar file
- Not a valid ZIP file
- ZIP file contains multiple file types
- Unsupported whisker type: ${whiskerOptions}
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/d59f3ef65d7ef622.
Report an issue: GitHub.