courtlistener icon indicating copy to clipboard operation
courtlistener copied to clipboard

ValueError: Unnumbered docket entry containing attachments

Open sentry-io[bot] opened this issue 1 year ago • 5 comments

This one happened only once and is rare. The issue arises from an unnumbered docket entry that contains attachments.

When searching for the entry in PACER, it is not published there. However, the attachment page includes both the main document and the attachments, leading to an error during the merging process. This is because a document number is required when merging attachments for recap.email. One potential solution is to merge attachments without a document number, although this means the value will be empty in the RECAPDocuments.

Perhaps this is an exception that should not occur again?

Sentry Issue: COURTLISTENER-6HG

ValueError: invalid literal for int() with base 10: ''
  File "cl/recap/tasks.py", line 2347, in process_recap_email
    all_attachment_rds = get_and_merge_rd_attachments(
  File "cl/recap/tasks.py", line 2195, in get_and_merge_rd_attachments
    main_rd_document_number = int(main_rd_local.document_number)

Filed by: @albertisfu

sentry-io[bot] avatar Feb 01 '24 02:02 sentry-io[bot]

When I inspected the attachment page it was uploaded. Screenshot 2024-01-31 at 20 38 43

It was merged without document_number (from process_recap_attachment the document number is not required). https://www.courtlistener.com/admin/search/docketentry/377170702/change/

Screenshot 2024-01-31 at 20 40 41

Entry is not available in PACER: Screenshot 2024-01-31 at 20 40 25

albertisfu avatar Feb 01 '24 02:02 albertisfu

This looks a lot like https://github.com/freelawproject/juriscraper/issues/577, no?

mlissner avatar Feb 05 '24 23:02 mlissner

I think it's a different one. While in https://github.com/freelawproject/juriscraper/issues/577 the problem was a document number parsing issue, here the error occurred at a later stage when adding attachments.

If the entry had not had attachments, it would have been added as an unnumbered entry without triggering any error. The main problem here is that the entry has attachments, and the document number is required when merging attachments for recap.email.

The solution could be to merge attachments without a document number, but I'm not sure if that's correct. Because in bankruptcy entries, isn't it expected that only numbered entries can have attachments?

albertisfu avatar Feb 06 '24 00:02 albertisfu

Talking with @ERosendo about #2835, I remembered about this issue. Perhaps the docket entry in this case is sealed (which is why it is not shown in PACER), while the attachment page still available? If so, maybe we can't rely on the attachment page to identify sealed entries when the entry has attachments.

albertisfu avatar Feb 06 '24 20:02 albertisfu

@albertisfu this entry is not sealed. It's another occurrence of the corner case explained in Juriscraper issue 577.

ERosendo avatar Feb 07 '24 01:02 ERosendo