Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to call async functions from a python file #25

Open
osancus opened this issue May 7, 2020 · 1 comment
Open

Unable to call async functions from a python file #25

osancus opened this issue May 7, 2020 · 1 comment

Comments

@osancus
Copy link

osancus commented May 7, 2020

Unable to call 'sub' function

async def sub(a, b):
  return a - b

Error:
sys:1: RuntimeWarning: coroutine 'sub' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
err : Unsupported type returned (coroutine), only pure Python types are supported.

Unable to call 'execute' function

def execute(a, b):
  loop = asyncio.get_event_loop()
  answer = loop.run_until_complete(sub(a,b))
  print(answer)
  loop.close()

Error:
Segmentation fault: 11

@osancus osancus changed the title Error: Could not find function name / function not callable Unable to call async functions from a python file May 7, 2020
@beeing
Copy link

beeing commented Jul 12, 2021

Not sure if this may help - https://stackoverflow.com/a/62383036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants