Casvt / Kapowarr

Kapowarr is a software to build and manage a comic book library, fitting in the *arr suite of software.
https://casvt.github.io/Kapowarr/
GNU General Public License v3.0
447 stars 17 forks source link

Unable to download. #76

Closed dervish666 closed 1 year ago

dervish666 commented 1 year ago

Description of the bug Error message when trying to download. Log below:

[2023-07-23 11:02:38][Task Handler][INFO] Adding download for volume 36: https://getcomics.org/marvel/x-men-ultimate-collection/ [2023-07-23 11:02:42][Task Handler][ERROR] An error occured while trying to run a task: Traceback (most recent call last): File "/app/backend/tasks.py", line 304, in __run_task self.download_handler.add(*download) File "/app/backend/download.py", line 751, in add downloads, limit_reached = _extract_download_links(link, volume_id, issue_id) File "/app/backend/download.py", line 620, in _extract_download_links return _test_paths(link_paths, volume_id) File "/app/backend/download.py", line 527, in _test_paths name = generate_issue_range_name( File "/app/backend/naming.py", line 173, in generate_issue_range_name issue_id = cursor.execute(""" TypeError: 'NoneType' object is not subscriptable

It then won't search for any more titles. I have to restart and it will then stop again at the same point, if I unmonitor the title it goes past it till it gets to the next download and fails again.

To Reproduce Seeing this on all downloads at the moment.

Expected behaviour Should download the files. Screenshots

Version info

Kapowarr version v1.0.0-beta-1

3.8.16.final.0 6 /app/db/Kapowarr.db /app

Using Unraid version.

Additional context

Casvt commented 1 year ago

One thing is not clear to me: are you unable to download ANYTHING (for any volume any download)? Or only for X-Men? Which volume of X-Men are you trying to download for?

Because for some of the entries in the list on the GC page, the titles are wrongly extracted by Kapowarr, leading to wrong issue numbers (see below). The error comes from Kapowarr searching for an issue number in the list of issues that Kapowarr has, but it can't be found in the list, even though it should be.

01. X-Men Vol. 2 (#05, #1 – 113 + Annuals) Part 1 — #1 – 25 gives:

{
    "series": "X-Men",
    "year": null,
    "volume_number": 2,
    "special_version": null,
    "issue_number": 5.0,
    "annual": false
}

but should be:

{
    "series": "X-Men",
    "year": null,
    "volume_number": 2,
    "special_version": null,
    "issue_number": (1.0, 25.0),
    "annual": false
}
dervish666 commented 1 year ago

I don't think it's anything, at the moment I've noticed it with Blacksad, Fable and that X-Men comic.

dervish666 commented 1 year ago

Blacksad

[2023-07-23 14:47:35][Task Handler][INFO] Starting manual search: Blacksad (2016) [2023-07-23 14:47:37][Task Handler][ERROR] An error occured while trying to run a task: Traceback (most recent call last): File "/app/backend/tasks.py", line 293, in __run_task result = task.run() File "/app/backend/tasks.py", line 256, in run results = auto_search(volume_id) File "/app/backend/search.py", line 443, in auto_search manual_search(volume_id, issue_id) File "/app/backend/search.py", line 347, in manual_search issue_numbers = {i[0]: int(i[1].split('-')[0]) for i in cursor} File "/app/backend/search.py", line 347, in issue_numbers = {i[0]: int(i[1].split('-')[0]) for i in cursor} AttributeError: 'NoneType' object has no attribute 'split'

Or maybe Fables is coming back as xmen?

Fables

[2023-07-23 14:49:29][Task Handler][INFO] Starting manual search: Fables (2002) [2023-07-23 14:49:30][Task Handler][INFO] Adding download for volume 36: https://getcomics.org/marvel/x-men-ultimate-collection/ [2023-07-23 14:49:34][Task Handler][ERROR] An error occured while trying to run a task: Traceback (most recent call last): File "/app/backend/tasks.py", line 304, in __run_task self.download_handler.add(*download) File "/app/backend/download.py", line 751, in add downloads, limit_reached = _extract_download_links(link, volume_id, issue_id) File "/app/backend/download.py", line 620, in _extract_download_links return _test_paths(link_paths, volume_id) File "/app/backend/download.py", line 527, in _test_paths name = generate_issue_range_name( File "/app/backend/naming.py", line 173, in generate_issue_range_name issue_id = cursor.execute(""" TypeError: 'NoneType' object is not subscriptable

Ahh, ok, nothing to do with Fables, just the last one in the list. Only these two that I can see. I will delete something I have previously downloaded and try again. #

dervish666 commented 1 year ago

Deleted and added another comic and it downloaded fine.

Casvt commented 1 year ago

These are actually two completely separate bugs.

  1. The second error (TypeError) had to do with Kapowarr wrongly thinking that one of the entries in the list of that "Ultimate Collection" was a match when it wasn't. Because it thought that it was a match, it searched for the issue numbers in it's metadata database but couldn't find them (because the issue numbers don't match with any in the actual volume) and errored out.

  2. On top of that, for some other entries in that list, the issue numbers were wrongly extracted, which lead to some problems.

Both these bugs have been fixed.

  1. The first error you gave (AttributeError) has to do with the fact the issues 6.1 and 6.2 in the volume don't have a release date.

I'm going to fix that one now.

Casvt commented 1 year ago

Fixed the last one too. All the errors you supplied in this issue are now fixed.