Getting error in project 10

While running the code I’m getting below error:

making request to Mailgun to send an email Traceback (most recent call last):

response_text = json. loads (response. text) File “/usr/lib/python3.5/json/”, line 319, in loads return _default_decoder.decode(s)

File “/usr/lib/python3.5/json/”, line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end())

File “/usr/lib/python3.5/json/”, line 357, in raw_decode raise JSONDecodeError(“Expecting value”, s, err.value) from None json.decoder JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “”, line 25, in except execution as e: NameError: name ‘execution’ is not defined suriyasam@ubuntu: "$


From the very last error it is quite visible that you have typed the wrong except block in line 25.

Correction -

except Exception as e: 
        print ("Error occured: Below are the details")

Instead of Exception, you have written ‘execution’.

Let me know if you have any other doubt.

If you read the last line of the error you can see it tells the error is in line 25 stating that in the word right after the except you have written execution instead of Exception and since execution is not a exception that is predefined in the library it shows error.

just change
except execution
except Exception