jgillula / paperless-ngx-postprocessor

A powerful and customizable postprocessing script for paperless-ngx
GNU Affero General Public License v3.0
97 stars 10 forks source link

Postprocessing gives errors if document doesn't have storage path, correspondent, or document type set #7

Closed esmoyer closed 1 year ago

esmoyer commented 1 year ago

I'm slowly figuring PaperlessNGX and this post-processing script out but I can't seem to figure out why when I manually run this script, the PaperlessNGX logs show this error: [WARNING] [django.request] Not Found: /api/storage_paths/None/

Not sure if I overlooked something, any insight that might point me in the right direction? Thanks!

jgillula commented 1 year ago

Do you have any documents that don't have a storage path set?

I don't think the code currently takes into account that storage path, correspondent, or document type could be set to none...

I think I can fix the bug, but I probably won't be able to get to it until this weekend.

esmoyer commented 1 year ago

Oh, wow. Yep, that was it. I know I overlooked something. For some reason I thought the storage path was set automatically. Set them manually and ran the script again and no errors. Thanks!

jgillula commented 1 year ago

I'm going to reopen this to track making the code more fault tolerant to missing storage paths, document types, and correspondents.