Skip to content

Thread 'main' panicked at /.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/postgres-0.19.9/src/connection.rs:66:22 #389

@solaryssky

Description

@solaryssky

Hello. I recently wrote about the problem: #387 . Then you fixed it. I rebuilt it again like this: cargo install --locked --git https://github.com/roapi/roapi --branch main --bins roapi --features database

But now I get another error:

roapi -c /home/dima/dev/Rust/roapi/test_data/config.yaml
[2025-03-25T16:04:50Z INFO roapi::context] loading `uri(postgresql://postgres:123ASDasd@127.0.0.1:5432/postgres)` as table `test`

thread 'main' panicked at /home/dima/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/postgres-0.19.9/src/connection.rs:66:22:
Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' panicked at /home/dima/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/postgres-0.19.9/src/connection.rs:66:22:
Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.
stack backtrace:

Here is the content of the configuration file:

addr:
  # binding address for TCP port that speaks HTTP protocol
  http: 127.0.0.1:8765
  # binding address for TCP port that speaks Postgres wire protocol
  postgres: 127.0.0.1:5433

tables:
  - name: "test"
    uri: "postgresql://postgres:123ASDasd@127.0.0.1:5432/postgres"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions