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
Using perspective 2.5.1 on Python 3.11 inside a conda environment
Additional Context:
I think the issue can be fixed inside the method perspective.client.base.PerspectiveClient:get_hosted_table_names.
If I understand the code correctly, this method should call self.post with a Future object, and return the future object instead.
I.e. something like
A hacky version of my exampe shows it works, although I'm not sure what type of future object you normally use
importasynciofromperspective.client.aiohttpimportPerspectiveAIOHTTPClientfromperspective.client.tornadoimportPerspectiveTornadoClientasyncdefmain_working(client_cls):
client=client_cls()
try:
awaitclient.connect('ws://127.0.0.1:8080/websocket')
# get_hosted_table_names is just a thin wrapper around the post function. # this code replicates its functionalityfut=asyncio.Future()
client.post(msg= {"cmd": "get_hosted_table_names"}, future=fut)
names=awaitfutprint(f"{client_cls.__name__} - workaround: {names}")
finally:
awaitclient.terminate()
if__name__=='__main__':
forclient_clsin [PerspectiveTornadoClient, PerspectiveAIOHTTPClient]:
asyncio.run(main_working(client_cls))
The text was updated successfully, but these errors were encountered:
Bug Report
Steps to Reproduce:
When using the method get_hosted_table_names PerspectiveTornadoClient or PerspectiveAIOHTTPClient I always get back None
Expected Result:
I would expect
['data_source_one']
to be printed.Actual Result:
Instead of
['data_source_one']
,names
isNone
.Environment:
Using perspective 2.5.1 on Python 3.11 inside a conda environment
Additional Context:
I think the issue can be fixed inside the method
perspective.client.base.PerspectiveClient:get_hosted_table_names
.If I understand the code correctly, this method should call self.post with a Future object, and return the future object instead.
I.e. something like
A hacky version of my exampe shows it works, although I'm not sure what type of future object you normally use
The text was updated successfully, but these errors were encountered: