python is running both try and except statement

Solutions on MaxInterview for python is running both try and except statement by the best coders in the world

showing results for - "python is running both try and except statement"
Gabriel
19 Jul 2017
1
2        elif 'where am i' in query or 'where we are' in query:
3            speak("wait sir let me check")
4            try:
5                ipAdd = requests.get('https://ipinfo.io/').text
6                print(ipAdd)
7                data = ipAdd.json()
8                #print(geo_data)
9                city = data['city']
10                # state = geo_data['state']
11                country = data['country']
12                speak(f'sir i m not sure but i think we are in {city} city of {country} country')
13            except Exception as e:
14                speak("sorry sir but due to network issues i m not able to found where we are")
15                pass
16
17