Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Data from CSV File into a Value Map Widget under a layers Properties > Attribute Form #60765

Open
2 tasks
Jakob-Lanstorp opened this issue Feb 26, 2025 · 4 comments · May be fixed by #60786
Open
2 tasks
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Forms

Comments

@Jakob-Lanstorp
Copy link

Jakob-Lanstorp commented Feb 26, 2025

What is the bug or the crash?

When having a Value Map Widget for a field and you "Load Data from CSV File" there are some problems.

Having a one column CSV file to load, it does not load valid data like
item1
item2
item3

but wants invalid formatet CSV data like
item1,
item2,
item3,

QGIS exporting to one column CSV does is correct without the trailing comma.

When importing from CSV via the button "Load Data from CSV File" the encoding in not shown correctly. Encoding looks fine in a QGIS table, exporting to CSV file using UTF-8 it still looks good, but when loaded with the button "Load Data from CSV File" the encoding is dropped.

The button "Load Data from Layer" has no problem with encoding.

Steps to reproduce the issue

Described in the bug text.

Versions

QGIS version
3.40.0-Bratislava
QGIS code revision
b56115d

Libraries
Qt version
5.15.13
Python version
3.12.7
GDAL/OGR version
3.9.3
PROJ version
9.5.0
EPSG Registry database version
v11.016 (2024-08-31)
GEOS version
3.13.0-CAPI-1.19.0
SQLite version
3.46.1
PDAL version
2.8.1
PostgreSQL client version
unknown
SpatiaLite version
5.1.0
QWT version
6.3.0
QScintilla2 version
2.14.1
OS version
Windows 11 Version 2009

Active Python plugins
contour
2.0.14
DataPlotly
4.2.0
dmpcatalogue
1.2.0
geosearch_dk
2.0.4
gko_data_extractor
3.1
gko_plotter
2.1.3
grukos
3.0.4
ImportPhotos
3.0.7
pluginbuilder3
3.2.1
plugin_reloader
0.17
pointsamplingtool
0.5.4
profiletool
4.2.6
qduckdb
1.3.1
qfieldsync
v4.12.2
Qgis2threejs
2.8
QlrBrowser
3.0.0
quick_map_services
0.20.0
valuetool
3.0.19
db_manager
0.1.20

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@Jakob-Lanstorp Jakob-Lanstorp added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Feb 26, 2025
@agiudiceandrea agiudiceandrea self-assigned this Feb 27, 2025
@agiudiceandrea
Copy link
Member

@Jakob-Lanstorp, what is the use case of loading a single column CSV in the valuemap widget?

@Jakob-Lanstorp
Copy link
Author

@agiudiceandrea, this is to my knowledge the only widget available for a combo box popup. The widget type "Unique Values" does not fit my need, since some items is not already in he field and the widget "List" is native to a Postgres array. The list items does not exist in a table so the "Value Relation" and "Relation Reference "widget won't work either.

@agiudiceandrea
Copy link
Member

agiudiceandrea commented Feb 28, 2025

@Jakob-Lanstorp, if you want, you can try out the MinGW64 Windows build #60786 (comment) in which the issues should be fixed: just download it, unzip, unzip again in a new folder, in command prompt cd to folder\bin, execute qgis.exe --noplugins. Please let me know if it is working as expected.

@Jakob-Lanstorp
Copy link
Author

@agiudiceandrea, I have tested on the Windows master build you referenced, and both the comma and encoding problem seems to be fixed. Good and fast fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Forms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants