Urgent Assistance Needed: Recurring "string indices must be integers" Error in PYA3 Library

Hello AliceBlue Team,

I hope this message finds you well. I am writing to bring to your attention a recurring issue that I have been facing while using the PYA3 library for accessing order details. I have encountered the following error repeatedly:

**ORDER STATUS ERROR: {TypeError('string indices must be integers')}**
**ORDER STATUS ERROR: {TypeError('string indices must be integers')}**
**......and a lot more times!**

This error seems to occur sporadically when I attempt to retrieve the order status using the provided function. Unfortunately, this problem has been persisting for quite some time, and despite my efforts, I haven’t been able to resolve it on my own.

For your reference, here is the code snippet I have been using:


def get_order_status(alice, oid):
    order_status = None
    sleep(1)
    for i in range(11):
        try:
            order_details = alice.get_order_history(str(oid))
            order_status = order_details['Status']
            return order_status
        except Exception as e:
            print("ORDER STATUS ERROR:", {e})
            sleep(10)
            pass

I understand that exceptions can occur, but the repeated nature of this issue is quite concerning. It affects the reliability of my scripts and can lead to disruptions in my AlgoTrading.

I kindly request your assistance in resolving this matter. It would be greatly appreciated if someone from the team could look into this issue and provide guidance on how to prevent these “string indices must be integers” errors from occurring. Since this issue seems to be random and occurs during script execution, a solution would significantly enhance the stability of my operations.

I look forward to your response and hope that we can work together to find a solution.

Best regards,
Aaush Raj

Attachments:
snapshot of my Logs file:

Kindly find below Links:

I’ve checked this before , and my code is updated with latest version of pya3 i.e * 1.0.29

@aclieblue team, please solve this issue. We are also facing the same. If you cannot clearly call out this thing that you will not be able to.