Open hiroTochigi opened 3 years ago
I think that the same problem happens at https://court.bot
I will experiment various Court Case Number to see what happen
I found out that if the case like below, oscn sends back events list. However, each event object in events list is an empty list-like object. Then, the court bot blows up because it accesses to a Docket attribute which does not exist. In order to handle this error, it is just to needed to handle this error. I will make a pull request to handle this error, so at least we prevent the court bot from halting suddenly. However, I have never encountered the an event object having Docket attribute with data even though I have encountered the event object having a Docket attribute with empty list. I picked up case numbers from 12/2020 to 1/2021 randomly, so I will extend the duration of case number samples to the past date.
I executed Courtbot API at my local environment, and I got an error. Then, I found that
event
object does not have Docket attribute.The below code is a part of
api/views.py
The
case
object is returned fromoscn
, then itsevents
value goes into thefind_arraignment_or_return_False()
method. Then,events
is iterated asevent
inside thefind_arraignment_or_return_False()
However,event
object does not haveDocket
attribute. Theevent
object has the following attributes.