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

Querying Excel file fails with 'Failed to bind "ST_Read": Table function must return at least one column' #362

Open
keremulutas opened this issue Jul 11, 2024 · 3 comments · Fixed by OSGeo/gdal#10453
Labels

Comments

@keremulutas
Copy link

keremulutas commented Jul 11, 2024

When I try to query an excel file having 1 sheet with name 'İstatistik' (notice the unicode character, https://www.compart.com/en/unicode/U+0130) - I am getting the following error:

INTERNAL Error: Failed to bind "ST_Read": Table function must return at least one column
This error signals an assertion failure within DuckDB. This usually occurs due to unexpected conditions or errors in the program's logic.
For more information, see https://duckdb.org/docs/dev/internal_errors

I added the file I'm trying to query, file.xlsx
file.xlsx

To reproduce:

duckdb -s "INSTALL spatial; LOAD spatial; SELECT * FROM st_read('file.xlsx');"

I also tried specifying the layer name with encoding the character like this, but no luck:

layer = "\u0130statistik"

DuckDB version: v1.0.0 1f98600c2c
OS: MacOS Ventura 13.5.1

@keremulutas
Copy link
Author

I also suspect the reason might be some kind of old version Excel file, but I couldn't verify as I don't have Microsoft Excel installed on my machine. However, when I import the file to Google Docs Spreadsheets and then download as .xlsm, it can be queried with having the same sheet name.

@keremulutas keremulutas changed the title Excel import fails with Unicode characters in sheet's name Querying Excel file fails with 'Failed to bind "ST_Read": Table function must return at least one column' Jul 18, 2024
@rouault
Copy link

rouault commented Jul 20, 2024

GDAL upstream issue that will be fixed per OSGeo/gdal#10453

@rouault
Copy link

rouault commented Aug 25, 2024

GDAL 3.9.2 has been released with the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants