Open SHewitt95 opened 7 years ago
It seems to have something to do with an earlier del statement: https://github.com/newsdev/who_the_hill/blob/master/twilio_app.py#L152
Commenting out that line allowed the failure message to send.
Looks like this line still executes even if we hit this prior section, thus causing the error. Removing the first del
fixes the issue.
Fun fact: finally
will always execute, regardless of what's in the try
block.
twilio_app.py
runs into this error when non-Congresspersons are sent in:...which results in no response from Twilio. Congresspeople do elicit a Twilio response, as expected. Images without recognized faces trigger a "failure message," as expected.
Example: Send in picture of Marco Rubio, get back Marco Rubio and image. Example: Send in picture of a chair, get back failure message. Example: Send in picture of Will Smith, get back nothing.