Skip to content

Creating multiple instance of Vapi object is not possible for handling multiple calls #13

@paraschhugani

Description

@paraschhugani
from vapi_python import Vapi

x = Vapi(api_key='****').start(assistant_id='****')
print(x , "   : x")
y = Vapi(api_key='****').start(assistant_id='****')
print(y , "   : y")

Error :

thread '' panicked at /Users/daily/actions-runner/_work/daily-x/daily-x/daily-core/src/native/ffi/context.rs:144:5:
Execution context already exists!
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread '' panicked at core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
0: 0x1053c6268 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h7adefaad4a31afc0
1: 0x1053e3440 - core::fmt::write::h381c0b0ce6ab972a
2: 0x1053c34b4 - std::io::Write::write_fmt::h75af97148630d8d3
3: 0x1053c611c - std::sys::backtrace::BacktraceLock::print::h8baf33e22611de71
4: 0x1053c7044 - std::panicking::default_hook::{{closure}}::h369c7295ef58c5b1
5: 0x1053c6e88 - std::panicking::default_hook::h50746358288a9d6a
6: 0x1053c77f8 - std::panicking::rust_panic_with_hook::h7d795911432661cb
7: 0x1053c7484 - std::panicking::begin_panic_handler::{{closure}}::h36f15310ecbde379
8: 0x1053c672c - std::sys::backtrace::_rust_end_short_backtrace::heed121414170e0c7
9: 0x1053c7164 - rust_begin_unwind
10: 0x10542cb9c - core::panicking::panic_nounwind_fmt::h5d86a478a9d7437c
11: 0x10542cc14 - core::panicking::panic_nounwind::he171ad52d328e60b
12: 0x10542cd00 - core::panicking::panic_cannot_unwind::h2dd8cd735765e065
13: 0x1047c68c8 - daily_core_context_create_with_threads
14: 0x1044633dc - daily::PyDaily::pymethod_init::h42edb4b7d1e63a58
15: 0x104462228 - pyo3::impl
::trampoline::trampoline::h5f1d25757413c76e
16: 0x104463078 - daily::<impl pyo3::impl
::pyclass::PyMethodsdaily::PyDaily for pyo3::impl
::pyclass::PyClassImplCollectordaily::PyDaily>::py_methods::ITEMS::trampoline::hb75f27c9f37646db
17: 0x102095c88 - _cfunction_call
18: 0x102027528 - __PyObject_MakeTpCall
19: 0x10216b598 - __PyEval_EvalFrameDefault
20: 0x1020272ac - __PyObject_FastCallDictTstate
21: 0x1020c3a08 - _slot_tp_init
22: 0x1020b8964 - _type_call
23: 0x102027528 - __PyObject_MakeTpCall
24: 0x10216b598 - __PyEval_EvalFrameDefault
25: 0x10202731c - __PyObject_FastCallDictTstate
26: 0x1020c3a08 - _slot_tp_init
27: 0x1020b8964 - _type_call
28: 0x102027528 - __PyObject_MakeTpCall
29: 0x10216b598 - __PyEval_EvalFrameDefault
30: 0x10215fa14 - _PyEval_EvalCode
31: 0x1021e022c - _run_mod
32: 0x1021df2b4 - _pyrun_file
33: 0x1021de210 - __PyRun_SimpleFileObject
34: 0x1021dddd4 - __PyRun_AnyFileObject
35: 0x10220c6a4 - _pymain_run_file_obj
36: 0x10220c41c - _pymain_run_file
37: 0x10220b6fc - _Py_RunMain
38: 0x10220bdc8 - _pymain_main
39: 0x10220bee4 - _Py_BytesMain
thread caused non-unwinding panic. aborting.
Abort trap: 6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions