Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panicked at 'called Option::unwrap() on a None #109

Open
cacaxiforyou opened this issue Jan 8, 2021 · 5 comments
Open

panicked at 'called Option::unwrap() on a None #109

cacaxiforyou opened this issue Jan 8, 2021 · 5 comments

Comments

@cacaxiforyou
Copy link

I downloaded the latest release version, The version does not seem to be updated to 0.1.1.

:~/csuckit# ./suckit -V
suckit 0.1.0

When I use it, errors occur most of the time. I don't know rust well, the program is great, I hope to get help.

RUST_BACKTRACE=1 ./suckit https://www.bing.com -v -j 8 -u "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" -t 2 -e ".*.png"
~/csuckit# RUST_BACKTRACE=1 ./suckit https://www.bing.com -v -j 8 -u "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" -t 2 -e ".*.png"
2021-01-08 11:17:33.851524278 +08:00: [INFO] Visited: https://www.bing.com/
2021-01-08 11:17:33.888791557 +08:00: [INFO] Visited: https://www.bing.com/th?id=OHR.FoucaultsPendulum_ZH-CN9435794626_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp
2021-01-08 11:17:33.952818147 +08:00: [INFO] Visited: https://www.bing.com/sa/simg/hpc27.png
2021-01-08 11:17:34.013390032 +08:00: [INFO] Visited: https://www.bing.com/rs/16/Z/cj,nj/SaARcujqfMTKslsX8RYX1fR5N7Q.js
2021-01-08 11:17:34.063275272 +08:00: [INFO] Visited: https://www.bing.com/rs/16/24/cj,nj/Dm21B_RK98kel_AmFzx_vVUxyA8.js
2021-01-08 11:17:34.178764453 +08:00: [INFO] Visited: https://www.bing.com/dict?FORM=Z9LH3
2021-01-08 11:17:34.181435859 +08:00: [INFO] Visited: https://www.bing.com/sa/simg/favicon-2x.ico
2021-01-08 11:17:34.186635845 +08:00: [INFO] Visited: https://www.bing.com/rs/16/27/cj,nj/HeslkHjv6jsQPEIfhz5LxGWUBHI.js
2021-01-08 11:17:34.191187684 +08:00: [INFO] Visited: https://www.bing.com/rs/16/2e/cj,nj/r55v7gxWDwkhcrGBcy9GDN-1JO8.js
2021-01-08 11:17:34.241397473 +08:00: [INFO] Visited: https://www.bing.com/maps?FORM=Z9LH4
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/scraper.rs:216:59
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:50:5
   3: suckit::scraper::Scraper::handle_url
   4: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:215:60
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::handle_url
   4: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any', src/scraper.rs:285:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::run
   4: suckit::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@CohenArthur
Copy link
Collaborator

I downloaded the latest release version, The version does not seem to be updated to 0.1.1.

:~/csuckit# ./suckit -V
suckit 0.1.0

Sorry about that, you did get the 0.1.1 release, it's just that the code's version specified in the file Cargo.toml wasn't updated 😅 You can create a PR for it if you want, or I'll update it

@CohenArthur
Copy link
Collaborator

I'm going to check the error you encountered. You're trying to download anything but PNG pictures from bing?

@Like0x
Copy link
Contributor

Like0x commented Jan 8, 2021

I'm going to check the error you encountered. You're trying to download anything but PNG pictures from bing?

Yes! . In fact, I want to do download some resources,such as html/js/css .But not image resources. I used bing for testing. I encountered this panic on many sites.

@Skallwar
Copy link
Owner

There are lot of issues right now that needs to be fixed before tackling this one. I will notify you when I will start working on this, but I can't give you a time frame, SuckIT is a side project for me for the time being.

@Like0x
Copy link
Contributor

Like0x commented Jan 13, 2021

There are lot of issues right now that needs to be fixed before tackling this one. I will notify you when I will start working on this, but I can't give you a time frame, SuckIT is a side project for me for the time being.

Thank :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants