dvalbuena1 / visa_rescheduler_aws

US VISA (ais.usvisa-info.com) appointment re-scheduler - Colombian adaptation - AWS Lambda
24 stars 10 forks source link

Issue when trying to get json data #9

Closed sebaz9130 closed 1 year ago

sebaz9130 commented 1 year ago

Hi guys, I'm getting the following error:

INFO:send_notification - Sending notification: HELP! Crashed.
ERROR:main - Message: no such element: Unable to locate element: {"method":"tag name","selector":"pre"}
  (Session info: headless chrome=111.0.5563.147)

within the function get_date we provide the variable DATE_URL but is not matching anything from the find element by NAME.

dvalbuena1 commented 1 year ago

Hey, sorry for the late reply. I was checking and it's a normal thing. From what I was seeing the error occurs when the endpoint that returns a JSON that has the list of appointments does not return anything. That's been happening a lot lately because no appointments are being found lately.

jyepesr1 commented 1 year ago

Hey @dvalbuena1 so, this is an expected behavior only?

dvalbuena1 commented 1 year ago

Yes it is normal, but to avoid the error and to handle in a better way that specific case when there are no dates I just made a new commit ff3583270f78757dd464aa72f668996d49b1b249 With this change the error will disappear from the logs.