Bigomby / shut-up-tglaren

:mute: Shut up, tglaren!
MIT License
1 stars 1 forks source link

Compile but doesn't run #2

Open stkw0 opened 5 years ago

stkw0 commented 5 years ago

thread 'main' panicked at 'called Result::unwrap() on an Err value: NotPresent', libcore/result.rs:945:5 stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace 1: std::sys_common::backtrace::print 2: std::panicking::default_hook::{{closure}} 3: std::panicking::default_hook 4: std::panicking::rust_panic_with_hook 5: std::panicking::begin_panic_fmt 6: rust_begin_unwind 7: core::panicking::panic_fmt 8: core::result::unwrap_failed 9: shut_up_tglaren::main 10: std::rt::lang_start::{{closure}} 11: std::panicking::try::do_call 12: __rust_maybe_catch_panic 13: std::rt::lang_start_internal 14: main 15: __libc_start_main 16: _star

Bigomby commented 5 years ago

I think you missed some environment variables. You need to provide both TELEGRAM_BOT_TOKEN and NAME_REGEX:

$ env TELEGRAM_BOT_TOKEN="123456..." NAME_REGEX="https*:\/\/" ./shut-up-tglaren  

In d8b0bcdce11f72773eac1edeb8e2a94195bfbb95 I'm using expect instead unwrap to warn about missing env variables.

stkw0 commented 5 years ago

Ah, yes, sorry, I pasted the wrong error

thread 'main' panicked at 'called Result::unwrap() on an Err value: Error(Raw(Json(Error("invalid type: map, expected a string", line: 2, column: 286))), State { next_error: None, backtrace: Some(stack backtrace: 0: 0x55c9c31ffbac - backtrace::backtrace::trace::h5e52f54b1a0d6e0c 1: 0x55c9c31ff1d2 - backtrace::capture::Backtrace::new::h786a79afbb53c5c1 2: 0x55c9c31fecac - error_chain::make_backtrace::h6e94ef1421ab635e 3: 0x55c9c31fed34 - ::default::h61866928bc181106 4: 0x55c9c31c0f2f - <telegram_bot_raw::requests::_base::errors::Error as core::convert::From>::from::h4eb3f6ec012843b1 5: 0x55c9c3161774 - telegram_bot_raw::requests::_base::response_types::json::::deserialize::h55f2d906c4ae71ff 6: 0x55c9c316e509 - <futures::future::chain::Chain<A, B, C>>::poll::h2b7cd44d2a5fca48 7: 0x55c9c3178228 - <futures::future::and_then::AndThen<A, B, F> as futures::future::Future>::poll::h66d2ce4797acf81e 8: 0x55c9c311444d - <futures::future::select::Select<A, B> as futures::future::Future>::poll::h4a32080578f3ad9d 9: 0x55c9c3180d8d - <futures::future::map::Map<A, F> as futures::future::Future>::poll::h9a99e60518717dc1 10: 0x55c9c3103990 - <futures::future::map_err::MapErr<A, F> as futures::future::Future>::poll::h02f7bd63d3e8f00f 11: 0x55c9c30fa8b1 - ::poll::h886a27cb60790e5a 12: 0x55c9c30e498b - <futures::stream::for_each::ForEach<S, F, U> as futures::future::Future>::poll::hda78ee029fbbc0ac 13: 0x55c9c30d7fe4 - <futures::task_impl::Spawn>::poll_future_notify::h28a674c62aa6f165 14: 0x55c9c30ef4fc - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::h992fe7f1d831227d 15: 0x55c9c30d82f4 - <futures::task_impl::Spawn>::poll_future_notify::hf88d44f20bc85a48 16: 0x55c9c30e5412 - <std::thread::local::LocalKey>::with::h5becca480f052ef8 17: 0x55c9c30e39f6 - <tokio::executor::current_thread::Entered<'a, P>>::block_on::h1e04e8c6a720b6b6 18: 0x55c9c30e58e6 - <std::thread::local::LocalKey>::with::h66bb6e33ab8dab95 19: 0x55c9c30e563b - <std::thread::local::LocalKey>::with::h652cfa429b000b1a 20: 0x55c9c30e5e28 - <std::thread::local::LocalKey>::with::he30c05ac5ed187fc 21: 0x55c9c30d7dd9 - <scoped_tls::ScopedKey>::set::h377cefb61a82db16 22: 0x55c9c30eda3b - tokio_core::reactor::Core::run::hec829097e895dc6e 23: 0x55c9c30e433a - shut_up_tglaren::main::h381505f2ccb933b3 24: 0x55c9c30ee2d2 - std::rt::lang_start::{{closure}}::h27294513c06ab24e 25: 0x55c9c3275052 - std::panicking::try::do_call::h81db17a28006ee0c 26: 0x55c9c328f3c9 - rust_maybe_catch_panic 27: 0x55c9c327a915 - std::rt::lang_start_internal::hd53bb36a273cf89e 28: 0x55c9c30e4633 - main 29: 0x7f2157e54ae6 - libc_start_main 30: 0x55c9c30cad19 - _start 31: 0x0 - ) })', libcore/result.rs:945:5 stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace 1: std::sys_common::backtrace::print 2: std::panicking::default_hook::{{closure}} 3: std::panicking::default_hook 4: std::panicking::rust_panic_with_hook 5: std::panicking::begin_panic_fmt 6: rust_begin_unwind 7: core::panicking::panic_fmt 8: core::result::unwrap_failed 9: shut_up_tglaren::main 10: std::rt::lang_start::{{closure}} 11: std::panicking::try::do_call 12: rust_maybe_catch_panic 13: std::rt::lang_start_internal 14: main 15: libc_start_main 16: _start

That is the real one