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

Bug: missing images during download are not properly managed #91

Open
1 of 4 tasks
jgurhem opened this issue Jan 6, 2025 · 2 comments
Open
1 of 4 tasks

Bug: missing images during download are not properly managed #91

jgurhem opened this issue Jan 6, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@jgurhem
Copy link

jgurhem commented Jan 6, 2025

What broke?

  • Downloader
  • Processor
  • Converter
  • Other

Mandown version
Output of mandown --version: 1.10.3

Describe the bug
A clear and concise description of what the bug is.

There was an issue while downloading some images and downloading raised an error. It feels like the application should either stop at this point or continue to download the rest of the chapters because the processor or the convertor was not able to find the chapters that were not downloaded.

Searching sources for https://chapmanganato.to/manga-de980813
Found comic "Eleceed" from source MangaNato
Downloading 339 chapter(s)...
Chapter 159  [################--------------------]   47%  00:00:32
Some image links on the host site were broken, ignoring...
Error: Failed to download 7 images
Successfully downloaded 339 chapter(s) to /mnt/c/Users/jgurhem/Downloads/Eleceed.
Applying processing options: webp_to_png
Processing  [####################################]  100%
Chapters were declared in /mnt/c/Users/jgurhem/Downloads/Eleceed/comicon.json but were not found in the filesystem: {'Chapter 218', 'Chapter 179', 'Chapter 325', 'Chapter 270', 'Chapter 272', 'Chapter 319', 'Chapter 259', 'Chapter 317', 'Chapter 239', 'Chapter 243', 'Chapter 228', 'Chapter 199', 'Chapter 294', 'Chapter 214', 'Chapter 244', 'Chapter 164', 'Chapter 216', 'Chapter 249', 'Chapter 302', 'Chapter 326', 'Chapter 278', 'Chapter 178', 'Chapter 226', 'Chapter 198', 'Chapter 187', 'Chapter 183', 'Chapter 197', 'Chapter 260', 'Chapter 165', 'Chapter 323', 'Chapter 203', 'Chapter 250', 'Chapter 262', 'Chapter 182', 'Chapter 211', 'Chapter 175', 'Chapter 227', 'Chapter 299', 'Chapter 190', 'Chapter 189', 'Chapter 314', 'Chapter 251', 'Chapter 275', 'Chapter 195', 'Chapter 238', 'Chapter 269', 'Chapter 177', 'Chapter 288', 'Chapter 258', 'Chapter 287', 'Chapter 210', 'Chapter 163', 'Chapter 324', 'Chapter 242', 'Chapter 235', 'Chapter 248', 'Chapter 185', 'Chapter 208', 'Chapter 166', 'Chapter 191', 'Chapter 236', 'Chapter 234', 'Chapter 328', 'Chapter 205', 'Chapter 202', 'Chapter 285', 'Chapter 221', 'Chapter 313', 'Chapter 160', 'Chapter 330', 'Chapter 174', 'Chapter 303', 'Chapter 282', 'Chapter 252', 'Chapter 261', 'Chapter 188', 'Chapter 268', 'Chapter 216.2', 'Chapter 311', 'Chapter 254', 'Chapter 246', 'Chapter 316', 'Chapter 309', 'Chapter 216.1', 'Chapter 247', 'Chapter 255', 'Chapter 276', 'Chapter 207', 'Chapter 273', 'Chapter 233', 'Chapter 212', 'Chapter 213', 'Chapter 229', 'Chapter 168', 'Chapter 293', 'Chapter 172', 'Chapter 263', 'Chapter 237', 'Chapter 170', 'Chapter 194', 'Chapter 318', 'Chapter 200', 'Chapter 222', 'Chapter 312', 'Chapter 241', 'Chapter 297', 'Chapter 224', 'Chapter 322', 'Chapter 290', 'Chapter 220', 'Chapter 161', 'Chapter 223', 'Chapter 274', 'Chapter 230', 'Chapter 180', 'Chapter 181', 'Chapter 204', 'Chapter 225', 'Chapter 296', 'Chapter 169', 'Chapter 184', 'Chapter 289', 'Chapter 193', 'Chapter 329', 'Chapter 232', 'Chapter 187-5', 'Chapter 257', 'Chapter 265', 'Chapter 315', 'Chapter 327', 'Chapter 321', 'Chapter 266', 'Chapter 256', 'Chapter 192', 'Chapter 331', 'Chapter 245', 'Chapter 305', 'Chapter 286', 'Chapter 284', 'Chapter 277', 'Chapter 295', 'Chapter 283', 'Chapter 304', 'Chapter 250.1', 'Chapter 171', 'Chapter 308', 'Chapter 281', 'Chapter 176', 'Chapter 310', 'Chapter 292', 'Chapter 201', 'Chapter 280', 'Chapter 219', 'Chapter 173', 'Chapter 300', 'Chapter 264', 'Chapter 267', 'Chapter 246.5', 'Chapter 231', 'Chapter 320', 'Chapter 301', 'Chapter 196', 'Chapter 206', 'Chapter 217', 'Chapter 253', 'Chapter 240', 'Chapter 291', 'Chapter 167', 'Chapter 271', 'Chapter 218.1', 'Chapter 306', 'Chapter 215', 'Chapter 209', 'Chapter 186', 'Chapter 279', 'Chapter 162', 'Chapter 307', 'Chapter 298', 'Chapter 302.5'}
Aborted!

Steps to reproduce
If the downloader broke, please include a URL that breaks it.

mandown get https://chapmanganato.to/manga-de980813 -c cbz -p webp_to_png

Additional context
Add any other context about the problem here.

@jgurhem jgurhem added the bug Something isn't working label Jan 6, 2025
@jgurhem
Copy link
Author

jgurhem commented Jan 7, 2025

As of today, chapter 359.1 seems to have issues during download. It allows to reproduce this issue easily.

mandown get https://chapmanganato.to/manga-ax951880 -s 600 -e 900 -c cbz -p webp_to_png
Searching sources for https://chapmanganato.to/manga-ax951880
Found comic "Tales Of Demons And Gods" from source MangaNato
Downloading 301 chapter(s)...
Chapter 359.1  [###################-----------------]   54%  00:00:28
Some image links on the host site were broken, ignoring...
Error: Failed to download 3 images
Successfully downloaded 301 chapter(s) to /mnt/c/Users/jgurhem/Downloads/Tales Of Demons And Gods.
Applying processing options: webp_to_png
Processing  [####################################]  100%
Chapters were declared in /mnt/c/Users/jgurhem/Downloads/Tales Of Demons And Gods/comicon.json but were not found in the filesystem: {'Chapter 391.5', 'Chapter 392.1', 'Chapter 369.1', 'Chapter 371.6', 'Chapter 365.5', 'Chapter 385.7', 'Chapter 380.1', 'Chapter 379.5', 'Chapter 386', 'Chapter 385.6', 'Chapter 387.5', 'Chapter 373.6', 'Chapter 386.1', 'Chapter 387.1', 'Chapter 392.5', 'Chapter 362.1', 'Chapter 364.5', 'Chapter 377.6', 'Chapter 373.5', 'Chapter 393.6', 'Chapter 378.5', 'Chapter 370.5', 'Chapter 385.1', 'Chapter 362.5', 'Chapter 371.1', 'Chapter 378.6', 'Chapter 384.6', 'Chapter 369.2', 'Chapter 368', 'Chapter 367.1', 'Chapter 374.6', 'Chapter 363', 'Chapter 377.5', 'Chapter 390.5', 'Chapter 372.5', 'Chapter 360.5', 'Chapter 379.1', 'Chapter 389', 'Chapter 392', 'Chapter 389.1', 'Chapter 379.6', 'Chapter 366.5', 'Chapter 375.5', 'Chapter 391.1', 'Chapter 390.6', 'Chapter 361.1', 'Chapter 393.1', 'Chapter 371.5', 'Chapter 378.1', 'Chapter 392.6', 'Chapter 359.6', 'Chapter 368.1', 'Chapter 387.6', 'Chapter 390.1', 'Chapter 381.1', 'Chapter 382.1', 'Chapter 383.1', 'Chapter 375.1', 'Chapter 385.5', 'Chapter 361', 'Chapter 370.6', 'Chapter 371', 'Chapter 372.2', 'Chapter 393.5', 'Chapter 370.1', 'Chapter 365.1', 'Chapter 382', 'Chapter 375.6', 'Chapter 367', 'Chapter 373.2', 'Chapter 370.2', 'Chapter 393', 'Chapter 372.6', 'Chapter 391.6', 'Chapter 372', 'Chapter 380.5', 'Chapter 373', 'Chapter 390', 'Chapter 362', 'Chapter 382.5', 'Chapter 360', 'Chapter 375', 'Chapter 380.6', 'Chapter 376.1', 'Chapter 389.5', 'Chapter 388.6', 'Chapter 385', 'Chapter 361.5', 'Chapter 380', 'Chapter 366', 'Chapter 370', 'Chapter 376', 'Chapter 381', 'Chapter 363.1', 'Chapter 378', 'Chapter 384', 'Chapter 383.6', 'Chapter 366.1', 'Chapter 367.5', 'Chapter 388.1', 'Chapter 381.6', 'Chapter 372.1', 'Chapter 379', 'Chapter 386.6', 'Chapter 364.6', 'Chapter 373.1', 'Chapter 376.6', 'Chapter 389.6', 'Chapter 384.1', 'Chapter 359.5', 'Chapter 386.5', 'Chapter 388', 'Chapter 363.5', 'Chapter 365', 'Chapter 383.5', 'Chapter 383', 'Chapter 382.6', 'Chapter 377.1', 'Chapter 369', 'Chapter 391', 'Chapter 376.5', 'Chapter 368.5', 'Chapter 369.6', 'Chapter 388.5', 'Chapter 360.6', 'Chapter 374.5', 'Chapter 364.1', 'Chapter 369.5', 'Chapter 394', 'Chapter 374.1', 'Chapter 387', 'Chapter 360.1', 'Chapter 374', 'Chapter 377', 'Chapter 364', 'Chapter 384.5', 'Chapter 381.5'}
Aborted!

And when run a second time:

Searching sources for https://chapmanganato.to/manga-ax951880
Found comic "Tales Of Demons And Gods" from source MangaNato
Downloading 201 chapter(s)...
Chapter 359.1  [###########-------------------------]   30%  00:00:28
Traceback (most recent call last):

  File "/home/jgurhem/anaconda3/envs/mandown/bin/mandown", line 8, in <module>
    sys.exit(main())
             ^^^^^^

  File "/home/jgurhem/anaconda3/envs/mandown/lib/python3.12/site-packages/mandown/cli.py", line 552, in main
    app()

  File "/home/jgurhem/anaconda3/envs/mandown/lib/python3.12/site-packages/mandown/cli.py", line 429, in get
    for title in progress:

  File "/home/jgurhem/anaconda3/envs/mandown/lib/python3.12/site-packages/mandown/api.py", line 298, in download_progress
    processed_image_urls, filestems = zip(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ValueError: not enough values to unpack (expected 2, got 0)

@potatoeggy
Copy link
Owner

potatoeggy commented Jan 12, 2025

The second issue should be fixed in v1.11.1. The first issue is more nuanced and progress is tracked in #96. Mandown now by default exits after a failed download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants