Unable to retrieve a single order by name if it is in certain range

Unable to retrieve a single order by name if it is in certain range

Ana-xx
Tourist
4 0 1

Hi everyone!

 

A pretty odd thing is happening. Here's the bit of code I use to fetch the data of a single order given the order name:

SHOPIFY_STORE_SUBDOMAIN = os.environ["SHOPIFY_STORE_SUBDOMAIN"]
SHOPIFY_TOKEN = os.environ["SHOPIFY_TOKEN"]
SHOPIFY_API_VERSION = "2022-04"

order_number = 20000
with shopify.Session.temp(SHOPIFY_STORE_SUBDOMAIN, SHOPIFY_API_VERSION, SHOPIFY_TOKEN):
    order = shopify.Order.find_first(name=order_number, status="any")

 

Usually, it works great. However, specifically if the order number is in range from 26613 to 26669 it fails to fetch any data. It does fetch the data for later and earlier orders without any issue at all. Only this range is somehow corrupt.

 

I went in and checked it in Shopify's admin UI, and here's an odd thing. Below is an example for one order from this range, but the same applies to all I checked (about ten of them). 

Screen Shot 2023-04-24 at 4.01.23 PM.pngScreen Shot 2023-04-24 at 4.01.36 PM.png

 

What you see is that you can't find this order via search (which is possible for any other order without a problem). However, this order very much exists, contains data and all.

 

I kind of can't wrap my head around it. Any ideas why this is happening to the orders in this range? 

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 509

Hi @Ana-xx - thanks for getting in touch. That is definitely strange, I appreciate you sharing the screenshot of what you're able to see in the shop's admin as well. I can't say for sure what may be occurring here without more information, but I can say that we have seen issues like this before. Since an investigation will require sharing a bit of private shop related information that we don't want to share publicly in the forum, you should get in touch with either our merchant support or partner support channels which you can access here.

If you're still encountering the issue and it hasn't resolved, I would share this thread with one of my colleagues that you speak with and mention that we've suggested that you get in touch with one of our technical support teams as they are generally able to assist with further troubleshooting. In cases where I've seen similar behaviour occurring (orders seemingly missing or being unable to be searched), we have been able to restore the functionality quickly, although I can't guarantee anything specifically here. 

Hope this helps - please don't hesitate to reach out here again if you do require further assistance after getting in touch with our live support team. 

 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog