# Queries with '?' cannot be exported to .csv

**URL:** <https://speciforum.org/t/queries-with-cannot-be-exported-to-csv/2565>\
**Category:** Get Help\
**Created:** [May 21, 2025, 6:28pm UTC](https://speciforum.org/t/queries-with-cannot-be-exported-to-csv/2565 "2025-05-21T18:28:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [May 21, 2025, 6:28pm UTC](https://speciforum.org/t/queries-with-cannot-be-exported-to-csv/2565/1 "2025-05-21T18:28:46Z")

</div>

v7.10.2.3  
Git SHA: [b41e3d6546523d455a7dc932c1eb444aedd07f94](https://github.com/specify/specify7/commit/b41e3d6546523d455a7dc932c1eb444aedd07f94)

Reporting what appears to be a small bug, no idea if it’s new or has always been this way.

I noticed that while attempting to save the results of a query with a “?” in the title, Specify will seemingly generate the file and will notify the user, but will not prompt the user to save the generated .csv file when they click “download” in the notifications dialog. Right clicking the “download” button and selecting “open in new tab” leads to a 404 error page.

No ‘?’, button works:

 ![Screenshot 2025-05-21 at 2.20.38 PM](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/b/b9ec820508a1fc96ed02b109c14b12768be9d613.jpeg)

Title contains ‘?’, button doesn’t work:

 ![Screenshot 2025-05-21 at 2.19.56 PM](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/3/3aef3133e3edc2fc457b9497579538640a609868.jpeg)  
 ![Screenshot 2025-05-21 at 2.19.06 PM](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/a/ab749b44a3cea4f65c7ae2c578fb2403fdf3a970.png)

I think this is probably a pretty easy fix, something to do with the character ‘?’ not being properly escaped in the code that generates CSVs? Notably the query JSON export for a query with a ‘?’ has the character ‘?’ represented as a “\_” in the filename.

Query that works:  
[0 - Wisconsin DNR deaccession List.json](https://speciforum.org/uploads/short-url/wwT4qePk6KJwG10K6gTqlNCbeZS.json) (15.7 KB)

Query that doesn’t work:  
[0 - Wisconsin DNR deaccession List\_.json](https://speciforum.org/uploads/short-url/upJLTdmo0WzRElA5LNOaQl5poLv.json) (15.7 KB)

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [May 22, 2025, 6:03am UTC](https://speciforum.org/t/queries-with-cannot-be-exported-to-csv/2565/2 "2025-05-22T06:03:03Z")

</div>

Hi @nfshoobs,

I’ve added your report to the GitHub repository:

> <https://github.com/specify/specify7/issues/6537>
>
> \*\*Describe the bug\*\*  
> When a saved query title contains a question mark (\`?\`), …clicking the “Download” button in the notifications dialog does not prompt the CSV download. The button appears, but no file dialog opens. Right-clicking and opening in a new tab leads to a 404 error.
> 
> \*\*To Reproduce\*\*  
> Steps to reproduce the behavior:  
> 1. Create or open a query whose title includes a \`?\` (for example, “Wisconsin DNR deaccession List?”).  
> 2. Run the query.  
> 3. In the notifications dialog, click \*\*Download\*\*.  
> 4. Observe that no save-file prompt appears.  
> 5. Right-click \*\*Download\*\* → \*\*Open in New Tab\*\*; see a 404 page.
> 
> \*\*Expected behavior\*\*  
> Clicking Download should properly escape the \`?\` (or otherwise handle it) so that the CSV file is served and the browser prompts the user to save it.
> 
> \*\*Screenshots\*\*  
> Query title without \`?\`, download works:  
> 
> \> !\[Image\](https://github.com/user-attachments/assets/e7f631e6-3336-477c-b469-e1adcca4b487)
> 
> 
> Query title with \`?\`, download fails:  
> 
> \> !\[Image\](https://github.com/user-attachments/assets/c330679e-8ffa-48c0-aa30-761941764acf)
> \> 
> \> !\[Image\](https://github.com/user-attachments/assets/4f66ee43-7b98-45f0-81d0-a8ff8daf121a)
> 
> 
> \*\*Crash Report\*\*  
> No crash. No error dialog.  
> 
> \- Specify 7 Version: \`v7.10.2.3\` (Git SHA: \[b41e3d6546523d455a7dc932c1eb444aedd07f94\](https://github.com/specify/specify7/commit/b41e3d6546523d455a7dc932c1eb444aedd07f94))  
> 
> \*\*Reported By\*\*  
> Oregon State University Mollusks (reported by Nate Shoobs) on the \[Speciforum\](https://speciforum.org/t/queries-with-cannot-be-exported-to-csv/2565)

Thank you for your detailed write up! I’ve already found and fixed this issue in my development environment, so you can count on this being fixed in an upcoming release.

---

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [May 22, 2025, 11:53am UTC](https://speciforum.org/t/queries-with-cannot-be-exported-to-csv/2565/3 "2025-05-22T11:53:04Z")

</div>

Thanks for squashing the bug! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/1/18a843c97bc32b40e8ad0e035755bc88ffaacaf7.svg) [@system](https://speciforum.org/u/system)\
**Post date:** [May 29, 2025, 11:53am UTC](https://speciforum.org/t/queries-with-cannot-be-exported-to-csv/2565/4 "2025-05-29T11:53:20Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
