ParserException error while listing the collections in area of interest

While extracting the collections present in my area of interest, I am getting the following ParserException error which I wasn’t getting before. I ran the codes in Terrascope as well as locally. I get this new error at both places. Additionally, on a separate note is it possible to upload a shapefile instead of a rectangular bounding box?

Looks like a fix for another issue caused a new error for your case. We’ll investigate this and make a fix asap. Regarding the option to upload a shapefile: we can look into it for a future update but difficult to anticipate when this will be rolled out.

For clarification purposes, could it be that before you ran into this issue you had only one private extraction dataset and now you have more? We had identified an issue that got triggered when there was more than one private extraction file. It was already fixed in our main branch but didn’t make it to a release yet and was apparently also not deployed on Terrascope.

The fix is now included in the newly released v2.2.3. We’ve also triggered a redeploy on Terrascope but this can take up to two hours to complete.

Could you confirm if this solves your issue?

UPDATE: Terrascope redeploy already finished.

Yes, I have added 2 new private collections now. The error is resolved on Terrascope now. Thanks for that. Although, I am still getting the same error when I run it locally. I had updated the git repo locally.

It’s odd that it doesn’t work locally. Which version of the package do you have installed locally?

i have the latest version of the repo, since I ran ‘git pull’ command before running the custom crop type notebook. I didn’t run the private extraction code though since I already had the extractions folder before.

The fix did not affect how the extractions are done. The issue was in the query constructed for the duckDB call to your extraction files. So the latest version should really resolve that and if not, feel free to send a more detailed stacktrace and version info.

Following is the traceback I got -
2025-06-05 14:38:26.007 | INFO | worldcereal.utils.refdata:query_public_extractions:52 - Applying a buffer of 250 km to the selected area …
2025-06-05 14:38:30.124 | INFO | worldcereal.utils.refdata:query_public_extractions:88 - Found 4 datasets in WorldCereal global extractions database that intersect with the selected area.
2025-06-05 14:38:30.126 | INFO | worldcereal.utils.refdata:query_public_extractions:92 - Querying WorldCereal global extractions database (this can take a while) …


PUBLIC EXTRACTIONS


Found 17 unique samples in the public data, spread across 1 unique reference datasets.
Public datasets:
2018_IND_CGIAR-GARDIAN_POINT_110


An error occurred: Parser Error: syntax error at or near “SET”
Traceback (most recent call last):
File “C:\Users\vaibhav.chhipa\AppData\Local\Temp\ipykernel_35948\2452068197.py”, line 19, in
extractions = query_extractions(polygon, buffer, private_parquet_path=private_extractions_path)
File “d:\python_everything\presto\worldcereal-classification\notebooks\notebook_utils\extractions.py”, line 412, in query_extractions
private_df = query_private_extractions(
File “c:\Users\vaibhav.chhipa\AppData\Local\miniconda3\envs\worldcereal\lib\site-packages\worldcereal\utils\refdata.py”, line 262, in query_private_extractions
private_df_raw = db.sql(main_query).df()
duckdb.duckdb.ParserException: Parser Error: syntax error at or near “SET”

Additional error information is same as I had pasted in above post, I’ll repaste it here for reference -

Okay so that looks indeed like the exact same issue which should be solved with the fix. Somehow your local version is not getting this fix; did you try a manual uninstall of the library and reinstall based on latest version in the repo?