Closed abhimanyusingh-sigfyn closed 3 weeks ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AbhinavTrips @bambriz @pilchie @pjohari-ms @simorenoh.
@abhimanyusingh-sigfyn thanks for your issue, the team will take a look and get back to you as soon as possible.
Hello @abhimanyusingh-sigfyn Thank you for bringing this to our attention. It seems this error is happening because the request object for the query is None while a retryable error occured. (One of the retryable errors you mentioned). One other question I have is how are you currently using the query_items() method you showed? Could you provide an example of how it is used?
Hello @bambriz. Here's an example of how query_items() is being used:
def get_data_from_db(container_name, query):
data = query_items("db_name", container_name, query, max_item_count=10000)
data_df = pd.Dataframe(data)
return data_df
def my_func():
query = "SELECT C.Col1, C.Col2, C.Col3 FROM C WHERE C.ID IN (<Str1>, <Str2>, <Str3>....) AND (C.Date IN (<Date1>, <Date2>, <Date3>...))"
data_df = get_data_from_db("db_container_name", query)
@abhimanyusingh-sigfyn The PR with the fix for this issue has been merged.
Hi @abhimanyusingh-sigfyn. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
Hi @abhimanyusingh-sigfyn, since you haven’t asked that we /unresolve
the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve
to reopen the issue.
Describe the bug I am encountering the following error while querying data from CosmosDB using the azure-cosmos Python SDK:
AttributeError("'NoneType' object has no attribute 'clear_route_to_location'")
.Sample Query
"SELECT C.Col1, C.Col2, C.Col3 FROM C WHERE C.ID IN (<Str1>, <Str2>, <Str3>....) AND (C.Date IN (<Date1>, <Date2>, <Date3>...))"
Table Details
{ "path": "/ID", "order": "ascending" }, { "path": "/Date", "order": "ascending" }
Upon further investigation, I came across 3 files in azure.cosmos library, that are referencing clear_route_to_location function:
Relevant code for initializing Azure CosmosClient for querying the table
To Reproduce The error is not consistently reproducible.
Expected behavior The query runs successfully and data is returned back.