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

Claims Register parse error: KeyError: 'Total Amount Claimed' #723

Open sentry-io[bot] opened 1 year ago

sentry-io[bot] commented 1 year ago

Sentry Issue: COURTLISTENER-4Y4

_RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/concurrent/futures/process.py", line 256, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/courtlistener/cl/recap/tasks.py", line 665, in parse_claims_register_text
    return report.data
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/juriscraper/pacer/claims_register.py", line 49, in data
    data["claims"] = self.claims
                     ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/juriscraper/pacer/claims_register.py", line 153, in claims
    claim.update(self._parse_amounts_cell(amounts_td))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/juriscraper/pacer/claims_register.py", line 250, in _parse_amounts_cell
    label = fields[label]
            ~~~~~~^^^^^^^
KeyError: 'Total Amount Claimed'
"""
KeyError: 'Total Amount Claimed'
(9 additional frame(s) were not displayed)
...
  File "concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
  File "concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "cl/recap/views.py", line 56, in perform_create
    await process_recap_upload(pq)
  File "cl/recap/tasks.py", line 125, in process_recap_upload
    await process_recap_claims_register(pq.pk)
  File "cl/recap/tasks.py", line 698, in process_recap_claims_register
    data = await asyncio.get_running_loop().run_in_executor(
sentry-io[bot] commented 11 months ago

Sentry issue: COURTLISTENER-5RZ

sentry-io[bot] commented 10 months ago

Related, the failure happened in the same line:

Sentry issue: COURTLISTENER-5NP

Linked by: @albertisfu