'Python not printing anything in Udacity Designing RESTful APIs lesson 2 mashup solution

I’ve been trying to create a mashup for the code. The problem I have is that my python program isn’t printing anything. I used the github solution too and it’s still not working. I am using python 3.7, maybe that is the reason. I used the solution from this link on github.

The only thing I had to change because of the lint, was to add braces in print file.

print ('Restaurant Name: %s' % restaurantInfo['name'])
print ('Restaurant Address: %s' % restaurantInfo['address'])
print ('Image: %s \n' % restaurantInfo['image'])

I tried to run the code using both python interpeter and also just run the command python findARestaurant.py so that it will run through main. But in both of the cases nothing is printed out. I have run the getGeoCode and it is working fine, also I checked the http request and it is also working fine with my clientID and secret.

HTTP REQUEST

https://api.foursquare.com/v2/venues/search?client_id=%s&client_secret=%s&v=20130815&ll=%s,%s&query=%s

I have also added another print statement to my function just to test if it would print anything from the first line of findARestaurant, but still nothing was printed. at this point I am not sure what might be the problem or what else I should try.

I have also created question on udacity forum.

any hints would help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source