andrewgremlich / photo-organizer

Organize photos quickly based off of dates in a folder hierarchy
MIT License
0 stars 0 forks source link

Panic #1

Closed levone1 closed 2 years ago

levone1 commented 2 years ago

Testing on SailfishOS. Builds and installs fine, but execution fails.

Attempted to organize photos from SD card, and output to a temp directory in ~. My command was photo_organizer --target /run/media/defaultuser/BB34-0DF6/Pictures --de st /home/defaultuser/tmpdir

Rust backtrace: thread 'main' panicked at 'calledResult::unwrap()on anErrvalue: NotFound("JPEG")', /home/defaultuser/.cargo/registry/src/github.com-1ecc6299db9ec823/photo_organizer-0.3.0/src/exif_wrapper/date_data.rs:13:6 stack backtrace: 0: 0x5c464bdc54 - std::backtrace_rs::backtrace::libunwind::trace::h1596a2cf286b6315 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5 1: 0x5c464bdc54 - std::backtrace_rs::backtrace::trace_unsynchronized::hc32053af612679aa at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x5c464bdc54 - std::sys_common::backtrace::_print_fmt::h7ee920c997b5768f at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:67:5 3: 0x5c464bdc54 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha68494c555289df1 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:46:22 4: 0x5c464dae48 - core::fmt::write::h854a552f3fef1302 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/fmt/mod.rs:1163:17 5: 0x5c464bac5c - std::io::Write::write_fmt::hf83df7127209d126 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/io/mod.rs:1696:15 6: 0x5c464bf4a0 - std::sys_common::backtrace::_print::had422318a813c91d at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:49:5 7: 0x5c464bf4a0 - std::sys_common::backtrace::print::h14680757cb89f697 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:36:9 8: 0x5c464bf4a0 - std::panicking::default_hook::{{closure}}::h493441a7fd15d2fe at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:210:50 9: 0x5c464bf05c - std::panicking::default_hook::h5875e6a6c859f261 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:227:9 10: 0x5c464bfb08 - std::panicking::rust_panic_with_hook::hf2274886cf6e43c5 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:624:17 11: 0x5c464bf62c - std::panicking::begin_panic_handler::{{closure}}::h891f0c5c8ff64c38 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:521:13 12: 0x5c464be10c - std::sys_common::backtrace::__rust_end_short_backtrace::hdedfdd62bd4e058a at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:139:18 13: 0x5c464bf598 - rust_begin_unwind at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5 14: 0x5c46451e28 - core::panicking::panic_fmt::h931d095b0b0bb02b at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14 15: 0x5c46451ec8 - core::result::unwrap_failed::h014a173cf14dd865 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:1616:5 16: 0x5c46456c20 - photo_organizer::exif_wrapper::date_data::read_exif_date_data::hcf3d18578d5e5bdc 17: 0x5c46455d88 - photo_organizer::organize::make_photo_library::h5a3b6aef1ef2bdb1 18: 0x5c4645482c - photo_organizer::main::h9ed3358e8fa75d28 19: 0x5c46452a28 - std::sys_common::backtrace::__rust_begin_short_backtrace::h124db46d9851e5fa 20: 0x5c46452a3c - std::rt::lang_start::{{closure}}::hd375a08d623176c3 21: 0x5c464bd9b0 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h8e8440f700c19e44 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:259:13 22: 0x5c464bd9b0 - std::panicking::try::do_call::h7547428deec627fe at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403:40 23: 0x5c464bd9b0 - std::panicking::try::h250a955f9b9f3587 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367:19 24: 0x5c464bd9b0 - std::panic::catch_unwind::h859dcd4f8de022a3 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133:14 25: 0x5c464bd9b0 - std::rt::lang_start_internal::{{closure}}::hd089501f4908b171 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:128:48 26: 0x5c464bd9b0 - std::panicking::try::do_call::h2bc1a1254f90fcd3 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403:40 27: 0x5c464bd9b0 - std::panicking::try::h442a6e86dbd6d8fa at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367:19 28: 0x5c464bd9b0 - std::panic::catch_unwind::hb3a9f2c0310dfe33 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133:14 29: 0x5c464bd9b0 - std::rt::lang_start_internal::h9d42d6dac4bfb1cf at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:128:20 30: 0x5c464548c0 - main 31: 0x7d6f3d111c - __libc_start_main 32: 0x5c46452424 - <unknown>

levone1 commented 2 years ago

btw - I just noticed "Media Organizer" repo is more recently updated... Any code differences? (downloading now)

andrewgremlich commented 2 years ago

Oh hey! This is a pleasant surprise that someone is using this. Media Organizer is more recently updated yes, this one shouldn't be used. Although I'm not too sure if that one will execute on SailFishOS successfully. hmm

andrewgremlich commented 2 years ago

Also, I have the destination flag as -d or --dest

andrewgremlich commented 2 years ago

Also, just in case, C++ build tools (like build-essentials) and ffmpeg are system dependencies, but it looks like that may not be the case with that stack trace.

andrewgremlich commented 2 years ago

I am going to improve the error handling for media_organizer.

levone1 commented 2 years ago

Also, just in case, C++ build tools (like build-essentials) and ffmpeg are system dependencies, but it looks like that may not be the case with that stack trace.

Thanks - I did use "--dest" (I don't know why it pasted as "--de st"...

I tested with Media Organizer also, and same result.

Ffmpeg is installed. There's no Build-Essentials, per se, for Sailfish, but I have gcc-c++, libstdc++, etc, and often compile from source. I'll poke around if maybe some other pkg might help... Any ideas of a specific one that may be missing?

andrewgremlich commented 2 years ago

Could you create a new issue with the new error handling version I made in media_organizer? I'll be sure to achive this repo.

levone1 commented 2 years ago

Could you create a new issue with the new error handling version I made in media_organizer? I'll be sure to achive this repo.

ok...