forked from SWISDATA/processintel
analysis.detection: file type detection is case-sensitive, and the error garbles the extension #13
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#13
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: medium (files like
EXPORT.CSVare rejected)Where
app/analysis/detection_model.py:56-66Problem
file_uploader(type=[".csv", ".xes"])acceptsEXPORT.CSVorlog.Xesbecause its check is case-insensitive, but detection then fails.split(".")[-1]already removes the dot, so the extra[1:]cuts off the first letter of the extension in the error message.Steps to reproduce
EXPORT.CSVExpected behavior
The file is recognized as CSV and imported.
Actual behavior
The user is sent back with the error "Unsupported file type 'SV'".
Fix
Compare with
file_name.lower().endswith(suffix.lower())(or usepathlib.Path(name).suffix.lower()), and drop the[1:].from
issues/BUG-013-file-type-detection-is-case-sensitive.md(code analysis of commit6bcc646, 2026-10-03)