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
thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 0.2.x runtime', [home]/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/io/driver/mod.rs:203:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
my Cargo.toml has tokio = { version = "1.20.1", features = ["rt-multi-thread", "macros"] }, but if I change the version to 0.2.25 to match the runtime said on the error, I then get the following (it changes to Tokio 1.x runtime instead of Tokio 0.2.x runtime):
thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', [home]/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.20/src/client/connect/dns.rs:121:24
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I'm new to rust, so this might be trivial, but I have no idea which other packages might be using tokio, and also not sure downgrading it is the best approach (I'd prefer to use the latest version, if possible)
My full Cargo.toml:
[package]
name = "thing"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
dotenv = "0.15.0"reqwest = "0.11.11"tokio = { version = "0.2.25", features = ["macros"] }
twitchchat = { version = "0.14.8", features = ["async", "tokio", "tokio-util"] }
twitch_oauth2 = { version = "0.7.0", features = ["reqwest"] }
anyhow = "1.0.59"serde = "1.0.143"serde_json = "1.0.83"
Is this really only solvable by downgrading all the packages until they all use the same tokio version?
The text was updated successfully, but these errors were encountered:
I'm trying to run the tokio example, but whenever we hit the line
let mut runner = AsyncRunner::connect(connector, &user_config).await?;
(https://github.com/museun/twitchchat/blob/master/examples/tokio_demo.rs#L20), I get the following error:my Cargo.toml has
tokio = { version = "1.20.1", features = ["rt-multi-thread", "macros"] }
, but if I change the version to0.2.25
to match the runtime said on the error, I then get the following (it changes toTokio 1.x runtime
instead ofTokio 0.2.x runtime
):I'm new to rust, so this might be trivial, but I have no idea which other packages might be using tokio, and also not sure downgrading it is the best approach (I'd prefer to use the latest version, if possible)
My full
Cargo.toml
:Is this really only solvable by downgrading all the packages until they all use the same tokio version?
The text was updated successfully, but these errors were encountered: