Syntax error in JOKES APP( Python )

Sir as you can see in the 1st image… I entered exactly what you’ve given but it showed me syntax error. Then I fixed it and again got another type of error which I didn’t understood.

@shobhit.kumawat @ashwin.salgaocar

Hi @suswagh28,

Thanks for bringing this to our notice. We will update the training content with the correct syntax. You can use the below line to get the response

response = requests.get(“https://icanhazdadjoke.com”, headers={“Accept”:“application/json”})

Here is the complete code to fetch the joke from the jokes API.

import requests
response = requests.get(“https://icanhazdadjoke.com”, headers={“Accept”:“application/json”})
print(response.status_code)
joke = response.json()[‘joke’]
print(joke)

Do let me know if you still face any issues.

Thank you so much sir… Issue resolved . Sir I’ve posted another query about Evernote App. While Running it in prototype… After taking NOTE from our side. It’s not executing the blocks ahead of it. It says Path Not Connected. What should I do Sir please tell me

@suswagh28 Apologies for the delay in response. Please allow us some time. We are looking into your issue and provide the resolution as soon as possible.

I know that the issue is resolved but there is something I’d like to add. For some reason, when you copy and paste the code provided above by Shobhit it gives the following error :


The reason behind the occurrence of such an error is, as stated by VsCode :

It says that the two characters are different and so a simple solution is to delete those characters that are causing this issue and manually add the appropriate characters in their place.

1 Like

Hello Sir,
I am facing name error while running text to speech part of JOKES APP. I request you to Kindly solve this issues ASAP. I have attached a screen shot of commands for your reference.

Hi @akansha0228,

Can you please share an appropriate time for screen sharing session regarding your issue?

Hello Sir,
On Which Platform do you want to connect?
I am available on 6 May 2022 at 12:00 pm to 3:00 pm.

Yes, whenever you copy paste it’s those different kind of " which cause such error. What you did is correct and probably the only way to remove the error. :+1:t2: