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] Post Processor throwing Attribute Error #80

Open
1 task done
uncapped1599 opened this issue Dec 20, 2024 · 1 comment
Open
1 task done

[BUG] Post Processor throwing Attribute Error #80

uncapped1599 opened this issue Dec 20, 2024 · 1 comment

Comments

@uncapped1599
Copy link

uncapped1599 commented Dec 20, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Whenever I trigger post process manually or the task runs automatically nothing happens and the logs throw the same error:

2024-12-20 10:38:28,387 ERROR POSTPROCESS postprocess.py process_dir 1747 Unhandled exception in process_dir: Traceback (most recent call last): File "/app/lazylibrarian/lazylibrarian/postprocess.py", line 1364, in process_dir success, dest_file, pp_path = process_destination(pp_path, dest_path, global_name, data, booktype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/lazylibrarian/lazylibrarian/postprocess.py", line 3124, in process_destination process_img(pp_path, bookid, data['BookImg'], make_unicode(global_name), ImageType.BOOK) File "/app/lazylibrarian/lazylibrarian/postprocess.py", line 3293, in process_img if bookimg.startswith('cache/'): ^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'startswith'

Expected Behavior

It should run the post process, find the snatched files and import them into the library.

Steps To Reproduce

Open eBooks page, click Run Post Processor, check Logs

Environment

- OS:Ubuntu Desktop 22.04.2 LTS
- How docker service was installed:
Via Docker compose file as below

CPU architecture

x86-64

Docker creation

lazylibrarian:
    image: lscr.io/linuxserver/lazylibrarian:latest
    container_name: lazylibrarian
    network_mode: "service:gluetun"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - DOCKER_MODS=linuxserver/mods:universal-calibre
    volumes:
      - ${CONFIG}/lazylibrarian/data:/config
      - ${DROPBOX}:/dropbox
      - ${DOWNLOADSBOOKS}:/completeBooks
    depends_on:
      - prowlarr
    restart: unless-stopped


### Container logs

```bash
2024-12-20 09:42:03,057 WARNING: eBook Leigh Bardugo Ninth House already marked snatched in wanted table [searchbook.py:191 (SEARCHALLBOOKS)]
2024-12-20 09:42:03,057 WARNING: eBook Alexis Daria Take the Lead already marked snatched in wanted table [searchbook.py:191 (SEARCHALLBOOKS)]
2024-12-20 09:42:03,057 WARNING: eBook Lorrie Moore The collected stories already marked snatched in wanted table [searchbook.py:191 (SEARCHALLBOOKS)]
2024-12-20 09:42:03,058 WARNING: eBook Bill Bryson The Lost Continent already marked snatched in wanted table [searchbook.py:191 (SEARCHALLBOOKS)]
2024-12-20 09:42:03,058 WARNING: eBook Bill Bryson Down Under (In a Sunburned Country) already marked snatched in wanted table [searchbook.py:191 (SEARCHALLBOOKS)]
2024-12-20 09:42:03,058 WARNING: eBook Bill Bryson Notes from a small island already marked snatched in wanted table [searchbook.py:191 (SEARCHALLBOOKS)]
2024-12-20 09:44:19,272 ERROR: Error reading data from http://localhost:9696/1/api: Response status 429: Too Many Requests [providers.py:1890 (SEARCHALLBOOKS)]
2024-12-20 09:44:19,273 INFO: Blocking provider http://localhost:9696/1/api for 1 hours because Response status 429: Too Many Requests [blockhandler.py:59 (SEARCHALLBOOKS)]
2024-12-20 09:44:53,333 INFO: NZB general search for eBook Neal Shusterman Everfound returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:45:23,342 INFO: NZB general search for eBook Neal Shusterman Scorpion Shards returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:45:35,349 INFO: NZB general search for eBook Neal Shusterman Darkness Creeping: Twenty Twisted Tales returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:45:47,327 INFO: NZB general search for eBook Neal Shusterman Thief of Souls returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:45:53,324 INFO: NZB general search for eBook Neal Shusterman Shattered Sky returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:49:15,335 INFO: Nearest match (71%): Life's Too Short by Abby Jimenez [ENG / EPUB] [VIP] using book search for Abby Jimenez Life’s Too Short [resultlist.py:291 (SEARCHALLBOOKS)]
2024-12-20 09:49:15,336 INFO: NZB search for eBook Abby Jimenez Life’s Too Short returned no results. [searchbook.py:265 (SEARCHALLBOOKS)]
2024-12-20 09:49:17,351 INFO: Nearest match (71%): Life's Too Short by Abby Jimenez [ENG / EPUB] [VIP] using book search for Abby Jimenez Life’s Too Short [resultlist.py:291 (SEARCHALLBOOKS)]
2024-12-20 09:49:17,352 INFO: NZB general search for eBook Abby Jimenez Life’s Too Short returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:49:19,333 INFO: Nearest match (71%): Life's Too Short by Abby Jimenez [ENG / EPUB] [VIP] using book search for Abby Jimenez Life’s Too Short [resultlist.py:291 (SEARCHALLBOOKS)]
2024-12-20 09:49:19,334 INFO: NZB title search for eBook Abby Jimenez Life’s Too Short returned no results. [searchbook.py:433 (SEARCHALLBOOKS)]
2024-12-20 09:50:37,335 INFO: NZB general search for eBook Isaac Asimov The Greeks: A Great Adventure returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:54:07,336 INFO: NZB general search for eBook James Blunt Loosely Based on a Made-Up Story returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:54:31,323 INFO: NZB general search for eBook Miguel Ruiz Jr. The Five Levels of Attachment returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:55:25,352 INFO: NZB general search for eBook Lisa Kleypas Secrets of A Summer Night returned no results. [searchbook.py:401 (SEARCHALLBOOKS)]
2024-12-20 09:55:27,336 INFO: Search for Wanted items complete, found 0 books [searchbook.py:519 (SEARCHALLBOOKS)]
2024-12-20 09:55:27,341 INFO: Job "lazylibrarian.searchbook.cron_search_book (trigger: interval[1:00:00], next run at: 2024-12-20 10:42:03)" executed successfully [scheduler.py:491 (WEBSERVER)]
2024-12-20 09:58:26,001 INFO: Running job "lazylibrarian.postprocess.PostProcessor (trigger: interval[0:20:00], next run at: 2024-12-20 09:58:26)" (scheduled at 2024-12-20 09:58:26) [scheduler.py:472 (Thread-209 (_run_jobs))]
2024-12-20 09:58:28,377 ERROR: Unhandled exception in process_dir: Traceback (most recent call last):
  File "/app/lazylibrarian/lazylibrarian/postprocess.py", line 1364, in process_dir
    success, dest_file, pp_path = process_destination(pp_path, dest_path, global_name, data, booktype)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lazylibrarian/lazylibrarian/postprocess.py", line 3124, in process_destination
    process_img(pp_path, bookid, data['BookImg'], make_unicode(global_name), ImageType.BOOK)
  File "/app/lazylibrarian/lazylibrarian/postprocess.py", line 3293, in process_img
    if bookimg.startswith('cache/'):
       ^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'
 [postprocess.py:1747 (POSTPROCESS)]
2024-12-20 09:58:28,379 INFO: Job "lazylibrarian.postprocess.PostProcessor (trigger: interval[0:20:00], next run at: 2024-12-20 10:18:26)" executed successfully [scheduler.py:491 (Thread-209 (_run_jobs))]
2024-12-20 10:05:24,477 INFO: Searching 3 providers ['nzb'] for 1 eBook [searchbook.py:157 (FORCE-SEARCHBOOK)]
2024-12-20 10:05:24,477 INFO: Provider Blocklist contains 1 entry [searchbook.py:160 (FORCE-SEARCHBOOK)]
2024-12-20 10:05:24,553 INFO: Nearest match (71%): Life's Too Short by Abby Jimenez [ENG / EPUB] [VIP] using book search for Abby Jimenez Life’s Too Short [resultlist.py:291 (FORCE-SEARCHBOOK)]
2024-12-20 10:05:24,554 INFO: NZB search for eBook Abby Jimenez Life’s Too Short returned no results. [searchbook.py:265 (FORCE-SEARCHBOOK)]
2024-12-20 10:05:26,557 INFO: Nearest match (71%): Life's Too Short by Abby Jimenez [ENG / EPUB] [VIP] using book search for Abby Jimenez Life’s Too Short [resultlist.py:291 (FORCE-SEARCHBOOK)]
2024-12-20 10:05:26,557 INFO: NZB general search for eBook Abby Jimenez Life’s Too Short returned no results. [searchbook.py:401 (FORCE-SEARCHBOOK)]
2024-12-20 10:05:28,564 INFO: Nearest match (71%): Life's Too Short by Abby Jimenez [ENG / EPUB] [VIP] using book search for Abby Jimenez Life’s Too Short [resultlist.py:291 (FORCE-SEARCHBOOK)]
2024-12-20 10:05:28,565 INFO: NZB title search for eBook Abby Jimenez Life’s Too Short returned no results. [searchbook.py:433 (FORCE-SEARCHBOOK)]
2024-12-20 10:05:28,566 INFO: Search for Wanted items complete, found 0 books [searchbook.py:519 (FORCE-SEARCHBOOK)]
2024-12-20 10:18:26,001 INFO: Running job "lazylibrarian.postprocess.PostProcessor (trigger: interval[0:20:00], next run at: 2024-12-20 10:18:26)" (scheduled at 2024-12-20 10:18:26) [scheduler.py:472 (Thread-210 (_run_jobs))]
2024-12-20 10:18:26,002 INFO: Running job "lazylibrarian.searchrss.cron_search_wishlist (trigger: interval[2:00:00], next run at: 2024-12-20 10:18:26)" (scheduled at 2024-12-20 10:18:26) [scheduler.py:472 (Thread-211 (_run_jobs))]
2024-12-20 10:18:28,522 ERROR: Unhandled exception in process_dir: Traceback (most recent call last):
  File "/app/lazylibrarian/lazylibrarian/postprocess.py", line 1364, in process_dir
    success, dest_file, pp_path = process_destination(pp_path, dest_path, global_name, data, booktype)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lazylibrarian/lazylibrarian/postprocess.py", line 3124, in process_destination
    process_img(pp_path, bookid, data['BookImg'], make_unicode(global_name), ImageType.BOOK)
  File "/app/lazylibrarian/lazylibrarian/postprocess.py", line 3293, in process_img
    if bookimg.startswith('cache/'):
       ^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'
 [postprocess.py:1747 (POSTPROCESS)]
2024-12-20 10:18:28,522 INFO: Job "lazylibrarian.postprocess.PostProcessor (trigger: interval[0:20:00], next run at: 2024-12-20 10:38:26)" executed successfully [scheduler.py:491 (Thread-210 (_run_jobs))]
2024-12-20 10:18:31,000 INFO: Found book Here One Moment by Liane Moriarty, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,009 INFO: Found book Three wishes by Liane Moriarty, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,019 INFO: Found book Truly Madly Guilty by Liane Moriarty, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,029 INFO: Found book The hypnotist's love story by Liane Moriarty, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,038 INFO: Found book A Good Girl's Guide to Murder by Holly Jackson, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,039 INFO: Found book The Housemaid by Freida McFadden, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,039 INFO: Found book The Housemaid, but series "The Housemaid" is Ignored [searchrss.py:114 (SEARCHWISHLIST)]
2024-12-20 10:18:31,051 INFO: Found book Consider Phlebas by Iain M. Banks, already marked as "Open" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,054 INFO: Found book The Forever War by Joe Haldeman, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,060 WARNING: No matching titles by OL8181316A:James B. Hendry in database (source=,library=eBook,ignored=False) [librarysync.py:329 (SEARCHWISHLIST)]
2024-12-20 10:18:31,066 WARNING: Skipping book Back to the Bush: Another Year in the Wild by James Hendry, No results returned [searchrss.py:274 (SEARCHWISHLIST)]
2024-12-20 10:18:31,080 WARNING: No matching titles by OL8181316A:James B. Hendry in database (source=,library=eBook,ignored=False) [librarysync.py:329 (SEARCHWISHLIST)]
2024-12-20 10:18:31,087 WARNING: Skipping book Return to the Wild: A Novel by James Hendry, No results returned [searchrss.py:274 (SEARCHWISHLIST)]
2024-12-20 10:18:31,092 WARNING: No matching titles by OL8181316A:James B. Hendry in database (source=,library=eBook,ignored=False) [librarysync.py:329 (SEARCHWISHLIST)]
2024-12-20 10:18:31,098 WARNING: Skipping book A Year in the Wild: A Riotous Novel by James Hendry, No results returned [searchrss.py:274 (SEARCHWISHLIST)]
2024-12-20 10:18:31,111 INFO: Found book Mercy of Gods by James S. A. Corey, already marked as "Wanted" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,121 INFO: Found book Rubicon by Tom Holland, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,133 INFO: Found book Grimoire of the Lamb by Kevin Hearne, already marked as "Wanted" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,142 INFO: Found book Band of Brothers by Stephen E. Ambrose, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,144 INFO: Found book Red God by Pierce Brown, already marked as "Wanted" [searchrss.py:69 (SEARCHWISHLIST)]
2024-12-20 10:18:31,145 INFO: Found book Protector by Conn Iggulden, already marked as "Have" [searchrss.py:69 (SEARCHWISHLIST)]
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

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

No branches or pull requests

1 participant