You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue seems to be that we should only connect to a session once within a thread, but in the self.client.execute function call in the query function, we are attempting to start a connection before sending a request. A solution to this might be to get a session object from the client, and then use this object when making query calls. Getting this session without making both the GraphqlClient and EnergyRoboticsApi classes async.
It seems that our Client object in the GraphqlClient class is not actually activated until we call execute, as mention in the documentation:
Unfortunately, using the client.connect_sync() function returns an error, whilst client.connect_async() is not an option since we cannot allow the GraphqlClient class to have an async constructor.
To Reproduce
Start a mission using the ISAR API. You may need to do this a couple of times.
Expected behavior
No exception should occur
Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
Query calls will occasionally return this exception in query() in graphql_client.py: https://gql.readthedocs.io/en/stable/modules/transport_exceptions.html#gql.transport.exceptions.TransportAlreadyConnected
The issue seems to be that we should only connect to a session once within a thread, but in the self.client.execute function call in the query function, we are attempting to start a connection before sending a request. A solution to this might be to get a session object from the client, and then use this object when making query calls. Getting this session without making both the GraphqlClient and EnergyRoboticsApi classes async.
It seems that our Client object in the GraphqlClient class is not actually activated until we call execute, as mention in the documentation:
This may also be relevant:
https://gql.readthedocs.io/en/stable/advanced/async_permanent_session.html
Unfortunately, using the client.connect_sync() function returns an error, whilst client.connect_async() is not an option since we cannot allow the GraphqlClient class to have an async constructor.
To Reproduce
Start a mission using the ISAR API. You may need to do this a couple of times.
Expected behavior
No exception should occur
Screenshots
The text was updated successfully, but these errors were encountered: