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
Can't run async function from Rust in Python with error:
RuntimeError:Cannot run the event loopwhile another loop is running
sys:1:RuntimeWarning: coroutine 'BaseEventLoop.shutdown_asyncgens' was never awaited
What am I doing wrong?
🌍 Environment
Your operating system and version: macOS 14.3.1 x86_64
Your python version: Python 3.11.7
How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?: virtualenv
Your Rust version (rustc --version): rustc 1.75.0
Your PyO3 version: pyo3 = "0.20.0"
Have you tried using latest PyO3 master (replace version = "0.x.y" with git = "https://github.com/awestlake87/pyo3-asyncio")?: no
💥 Reproducing
Cargo.toml
[package]
name = "bar"
version = "0.1.0"
edition = "2021"[lib]
name = "bar"
crate-type = ["cdylib"][dependencies]
pyo3 = { version = "0.20", features = ["extension-module"]}
pyo3-asyncio = { version = "0.20", features = ["tokio-runtime","attributes","pyo3-asyncio-macros",]}
tokio = { version = "1", features = ["full"]}
datafusion = { version = "36", features = ["pyarrow"]}
🐛 Bug Reports
Can't run async function from Rust in Python with error:
What am I doing wrong?
🌍 Environment
rustc --version
): rustc 1.75.0version = "0.x.y"
withgit = "https://github.com/awestlake87/pyo3-asyncio")?
: no💥 Reproducing
Cargo.toml
lib.rs
main.py
Here is the example without async that works
Cargo.toml
lib.rs
main.py
The text was updated successfully, but these errors were encountered: