twilio-python
twilio-python copied to clipboard
Studio Flow list() hangs
Issue Summary
For the last two days calls to read studio flows and executions have been hanging. This worked fine before that. I've been using the list
call:
res = Client(ACCOUNT_SID, AUTH_TOKEN).studio.flows.list()
The same seems to be happening when trying to list executions of a flow as follows:
res = Client(ACCOUNT_SID, AUTH_TOKEN).studio.flows(flow_id).executions.list()
I also tried using stream
but that hangs once you start trying to iterate over the result.
I also took a look at paging, but that may have another issue as it seems to always return the first page (next_page
is just getting the same page again).
Technical details:
- twilio-python version: 6.52.0
- python version: 3.8.7 (docker image)
Hello @totalhack,
I am unable to reproduce using twilio-python
version 6.53, with python version 3.8.3, using the following code:
from twilio.rest import Client
account_sid = os.environ.get('TWILIO_ACCOUNT_SID')
auth_token = os.environ.get('TWILIO_AUTH_TOKEN')
res = Client(account_sid, auth_token).studio.flows.list()
print(res)
The above code return an array of Twilio.Studio.V2.FlowInstance
's.
Here a few follow up questions:
- Could you please try upgrading to version 6.53?
- How many flows do you have? (rough estimate is fine)
Thank you!
With best regards,
Elmer
Thanks, I'll try 6.53 tomorrow and report back. Was that just released? I thought I updated to the latest today (6.52).
The account has 60 flows.
Yes, 6.53 was released today. Thank you!
So I actually just tried with 6.53 and it still behaves the same. I stepped further into the code and noticed that under the hood list
just calls stream
which uses paging which appears to be running into the issue I mentioned in my initial post.
I only have 60 flows, and I'm watching it somehow count up to the 4th page now as I step through (150 rows synced in the first 3 pages, 50 rows per page). So it appears paging is broken...something in the process of getting the next page.
Thanks for confirming @totalhack, my first guess is that it has something to do with this change.
This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
Hi @totalhack after further investigation this appears to be an issue with the API itself. In order to properly debug this issue, please file a support ticket.