generated from djangoaddicts/django_package_template
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Problem:
Upload a csv file (download from: https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv) with default view as: http://127.0.0.1:8000/pygwalker/, it always throw error "file provided is not a csv file".
After check source code, found in below:
if mimetypes.guess_type(csv_file.name)[0] not in ["text/csv"]: |
And the root cause is the mimetypes.guess_type
return value "application/vnd.ms-excel" from Python mimetypes.py, which the value is cause by
db.read_windows_registry()
Solution:
Maybe add the value "application/vnd.ms-excel" to code like this:
if mimetypes.guess_type(csv_file.name)[0] not in ["text/csv", "application/vnd.ms-excel"]:
Metadata
Metadata
Assignees
Labels
No labels