freelawproject / juriscraper

An API to scrape American court websites for metadata.
https://free.law/juriscraper/
BSD 2-Clause "Simplified" License
378 stars 111 forks source link

IntegrityError: null value in column "docket_number" of relation "scrapers_pacerfreedocumentrow" violates not-nul... #1205

Closed sentry-io[bot] closed 1 month ago

sentry-io[bot] commented 1 month ago

Sentry Issue: COURTLISTENER-8B2

NotNullViolation: null value in column "docket_number" of relation "scrapers_pacerfreedocumentrow" violates not-null constraint
DETAIL:  Failing row contains (13119137, mdd, 320732, null, AYLEN v. VOLUNTEERS OF AMERICA CHESAPEAKE, INC., 2015-06-29, 09306953612, 14, MEMORANDUM  OPINION filed.  Signed by Judge Mary L. Cooper on 6/..., , , , 54).
  File "django/db/backends/utils.py", line 105, in _execute
    return self.cursor.execute(sql, params)
  File "psycopg/cursor.py", line 732, in execute
    raise ex.with_traceback(None)

IntegrityError: null value in column "docket_number" of relation "scrapers_pacerfreedocumentrow" violates not-null constraint
DETAIL:  Failing row contains (13119137, mdd, 320732, null, AYLEN v. VOLUNTEERS OF AMERICA CHESAPEAKE, INC., 2015-06-29, 09306953612, 14, MEMORANDUM  OPINION filed.  Signed by Judge Mary L. Cooper on 6/..., , , , 54).
(19 additional frame(s) were not displayed)
...
  File "manage.py", line 11, in main
    execute_from_command_line(sys.argv)
  File "cl/corpus_importer/management/commands/scrape_pacer_free_opinions.py", line 507, in handle
    action(**filtered_kwargs)
  File "cl/corpus_importer/management/commands/scrape_pacer_free_opinions.py", line 239, in get_and_save_free_document_reports
    exc = fetch_doc_report(
  File "cl/corpus_importer/management/commands/scrape_pacer_free_opinions.py", line 125, in fetch_doc_report
    status, rows_to_create = get_and_save_free_document_report(pacer_court_id, start, end, log.pk)  # type: ignore
  File "cl/corpus_importer/tasks.py", line 442, in get_and_save_free_document_report
    PACERFreeDocumentRow.objects.bulk_create(document_rows_to_create)
quevon24 commented 1 month ago

I made a mistake when creating it from sentry, it should go in courtlistener.