Some issues when using grit with ipython notebooks
eyurtsev opened this issue · comments
grit apply --language python 'foo
' deepinfra.ipynb
The notebook is this:
https://github.com/langchain-ai/langchain/blob/master/docs/docs/integrations/chat/deepinfra.ipynb
We have a lot of example notebooks, you could test it running across the notebooks located in:
https://github.com/langchain-ai/langchain/blob/master/docs/docs/
Some info:
async def call_ainvoke():
result = await llm_with_tools.ainvoke(messages)
print(result.tool_calls)
# Async call
asyncio.run(call_ainvoke())
thread '<unnamed>' panicked at vendor/gritql/crates/cli/src/result_formatting.rs:227:66:
byte index 7 is out of bounds of ` },`
stack backtrace:
0: 0x5e84f5dde52b - std::backtrace_rs::backtrace::libunwind::trace::hbee8a7973eeb6c93
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
1: 0x5e84f5dde52b - std::backtrace_rs::backtrace::trace_unsynchronized::hc8ac75eea3aa6899
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x5e84f5dde52b - std::sys_common::backtrace::_print_fmt::hc7f3e3b5298b1083
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:68:5
3: 0x5e84f5dde52b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbb235daedd7c6190
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:44:22
4: 0x5e84f4cd5390 - core::fmt::rt::Argument::fmt::h76c38a80d925a410
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/rt.rs:142:9
5: 0x5e84f4cd5390 - core::fmt::write::h3ed6aeaa977c8e45
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/mod.rs:1120:17
6: 0x5e84f5dd9703 - std::io::Write::write_fmt::h78b18af5775fedb5
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/io/mod.rs:1810:15
7: 0x5e84f5dde2c4 - std::sys_common::backtrace::_print::h5d645a07e0fcfdbb
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:47:5
8: 0x5e84f5dde2c4 - std::sys_common::backtrace::print::h85035a511aafe7a8
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:34:9
9: 0x5e84f5de04f0 - std::panicking::default_hook::{{closure}}::hcce8cea212785a25
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:272:22
10: 0x5e84f5de020f - std::panicking::default_hook::hf5fcb0f213fe709a
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:292:9
11: 0x5e84f5de0a0e - std::panicking::rust_panic_with_hook::h095fccf1dc9379ee
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:779:13
12: 0x5e84f5de0912 - std::panicking::begin_panic_handler::{{closure}}::h032ba12139b353db
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:657:13
13: 0x5e84f5ddea26 - std::sys_common::backtrace::__rust_end_short_backtrace::h9259bc2ff8fd0f76
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:171:18
14: 0x5e84f5de0680 - rust_begin_unwind
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
15: 0x5e84f4b27325 - core::panicking::panic_fmt::h784f20a50eaab275
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
16: 0x5e84f4cd8be4 - core::str::slice_error_fail_rt::hf5370cee7eac4e86
17: 0x5e84f4b27b47 - core::str::slice_error_fail::hae3b26614aa3049f
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/str/mod.rs:88:9
18: 0x5e84f5609261 - <marzano_cli::result_formatting::FormattedResult as core::fmt::Display>::fmt::h4bcdc66237ca8439
19: 0x5e84f4cd5390 - core::fmt::rt::Argument::fmt::h76c38a80d925a410
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/rt.rs:142:9
20: 0x5e84f4cd5390 - core::fmt::write::h3ed6aeaa977c8e45
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/mod.rs:1120:17
21: 0x5e84f4cd5390 - core::fmt::rt::Argument::fmt::h76c38a80d925a410
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/rt.rs:142:9
22: 0x5e84f4cd5390 - core::fmt::write::h3ed6aeaa977c8e45
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/mod.rs:1120:17
23: 0x5e84f557b27e - std::io::Write::write_fmt::hc605dddb41a8c010
24: 0x5e84f5457d8e - marzano_cli::commands::run_command::{{closure}}::{{closure}}::{{closure}}::h1086db7df7127069
25: 0x5e84f4e9dd2f - <env_logger::logger::Logger as log::Log>::log::{{closure}}::h73362ccc5693a64f
26: 0x5e84f4e9dac2 - <env_logger::logger::Logger as log::Log>::log::hd905895fc53e2c37
27: 0x5e84f5442836 - indicatif::multi::MultiProgress::suspend::hde6ebaf1f0ab309a
28: 0x5e84f5609c01 - <marzano_cli::result_formatting::FormattedMessager as marzano_messenger::emit::Messager>::raw_emit::h800713e9f1d6dd73
29: 0x5e84f551d843 - marzano_messenger::emit::Messager::handle_results_inner::hc0a3255fe07df471
30: 0x5e84f551cf9b - marzano_messenger::emit::Messager::handle_results::h0dfe11586bec92c6
31: 0x5e84f54b4a35 - std::panicking::try::hc1f6ec1b812ad626
32: 0x5e84f55d902c - <rayon_core::job::HeapJob<BODY> as rayon_core::job::Job>::execute::hdcdc38c48f9bb821
33: 0x5e84f4ba34f0 - rayon_core::registry::WorkerThread::wait_until_cold::h2afd995aa15e887d
34: 0x5e84f5aec21b - rayon_core::registry::ThreadBuilder::run::hce306da013010bfe
35: 0x5e84f5af24aa - std::sys_common::backtrace::__rust_begin_short_backtrace::hf3425bb081e06468
36: 0x5e84f5aefef8 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hf4702661eaccf806
37: 0x5e84f5de5ea5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h12de4fc57affb195
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2015:9
38: 0x5e84f5de5ea5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3c619f45059d5cf1
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2015:9
39: 0x5e84f5de5ea5 - std::sys::unix::thread::Thread::new::thread_start::hbac657605e4b7389
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys/unix/thread.rs:108:17
40: 0x77c048805ac3 - start_thread
at ./nptl/pthread_create.c:442:8
41: 0x77c048897850 - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
42: 0x0 - <unknown>