# ParserException error while listing the collections in area of interest

**URL:** <https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72>\
**Category:** Processing Module\
**Created:** [2 June 2025 07:12 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72 "2025-06-02T07:12:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaibhav](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vaibhav](https://forum.esa-worldcereal.org/u/vaibhav)\
**Post date:** [2 June 2025 07:12 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/1 "2025-06-02T07:12:32Z")

</div>

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?

 ![image](https://canada1.discourse-cdn.com/flex034/uploads/esa_worldcereal1/original/1X/e3a1b56ed9b6c02347d419290e1b0043df346800.png)

---

<div class="post-metadata">

**Author:** ![kristof.vantricht](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kristof.vantricht](https://forum.esa-worldcereal.org/u/kristof.vantricht)\
**Post date:** [2 June 2025 18:24 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/2 "2025-06-02T18:24:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kristof.vantricht](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kristof.vantricht](https://forum.esa-worldcereal.org/u/kristof.vantricht)\
**Post date:** [3 June 2025 09:54 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/3 "2025-06-03T09:54:20Z")

</div>

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](https://github.com/WorldCereal/worldcereal-classification/releases/tag/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.

---

<div class="post-metadata">

**Author:** ![vaibhav](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vaibhav](https://forum.esa-worldcereal.org/u/vaibhav)\
**Post date:** [4 June 2025 07:15 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/4 "2025-06-04T07:15:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kristof.vantricht](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kristof.vantricht](https://forum.esa-worldcereal.org/u/kristof.vantricht)\
**Post date:** [4 June 2025 07:39 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/5 "2025-06-04T07:39:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vaibhav](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vaibhav](https://forum.esa-worldcereal.org/u/vaibhav)\
**Post date:** [4 June 2025 11:49 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/6 "2025-06-04T11:49:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kristof.vantricht](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kristof.vantricht](https://forum.esa-worldcereal.org/u/kristof.vantricht)\
**Post date:** [4 June 2025 12:02 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/7 "2025-06-04T12:02:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vaibhav](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vaibhav](https://forum.esa-worldcereal.org/u/vaibhav)\
**Post date:** [5 June 2025 09:12 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/8 "2025-06-05T09:12:53Z")

</div>

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 -

 ![image](https://canada1.discourse-cdn.com/flex034/uploads/esa_worldcereal1/original/1X/692bb47fe9f00bcae7a770ea5dc23d4adf2e9867.png)

---

<div class="post-metadata">

**Author:** ![kristof.vantricht](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kristof.vantricht](https://forum.esa-worldcereal.org/u/kristof.vantricht)\
**Post date:** [5 June 2025 12:33 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/9 "2025-06-05T12:33:08Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jeroen.degerickx](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.esa-worldcereal.org/jeroen.degerickx/32/18_2.png) [@jeroen.degerickx](https://forum.esa-worldcereal.org/u/jeroen.degerickx)\
**Post date:** [18 June 2025 17:17 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/10 "2025-06-18T17:17:39Z")

</div>

Regarding the possibility to upload a shapefile instead of drawing a bbox:  
We have developed this functionality and it will be deployed in all notebooks from next week onwards.

---

<div class="post-metadata">

**Author:** ![vaibhav](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vaibhav](https://forum.esa-worldcereal.org/u/vaibhav)\
**Post date:** [19 June 2025 04:34 UTC](https://forum.esa-worldcereal.org/t/parserexception-error-while-listing-the-collections-in-area-of-interest/72/11 "2025-06-19T04:34:41Z")

</div>

That’s wonderful! Thanks for including this functionality.
