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

Python: AttributeError: 'Kernel' object has no attribute 'run_async' #5471

Closed
Jasper-zh opened this issue Mar 14, 2024 · 1 comment
Closed
Labels
python Pull requests for the Python Semantic Kernel

Comments

@Jasper-zh
Copy link

https://learn.microsoft.com/en-us/semantic-kernel/prompts/saving-prompts-as-files?tabs=python

Is the document not updated?

My version 0.9.2

    result = asyncio.run(kernel.run_async(
        my_plugins["city_point"],
        input_vars=["wuhan"],
    ))
    print(result)

Traceback (most recent call last):
File "C:\Users\zhang\MySpace\dev\coding\python\file_exhange\semantic_kernel_02.py", line 30, in
result = asyncio.run(kernel.run_async(
^^^^^^^^^^^^^^^^
File "C:\Users\zhang\MySpace\dev\coding\python\file_exhange.venv\Lib\site-packages\pydantic\main.py", line 761, in getattr
raise AttributeError(f'{type(self).name!r} object has no attribute {item!r}')
AttributeError: 'Kernel' object has no attribute 'run_async'

@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel triage labels Mar 14, 2024
@moonbox3
Copy link
Contributor

moonbox3 commented Mar 14, 2024

@Jasper-zh Correct, this doc needs an update. Please refer to these examples, or any other kernel example in the samples folder, as well as Jupyter notebooks.

await kernel.run_async(...) -> await kernel.invoke(...)

We're tracking this doc update in a separate work item (#1985), so closing this issue.

@moonbox3 moonbox3 removed the triage label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

No branches or pull requests

3 participants