Demo: Calling An API | Python for Beginners [37 of 44]

preview_player
Показать описание


#microsoftdeveloper #pythonforbeginners #learntocode
Рекомендации по теме
Комментарии
Автор

Very helpful from previous comments; thank you all!
USE:
address = vision_service_address + "vision/v2.0/analyze"
INSTEAD OF:
address = vision_service_address + "analyze"


Thanks!

semezai
Автор

You guys really shouldn't have used an API service requiring users to provide a credit card for "verification purposes".

AP-ibrf
Автор

Replace "requests" by "pip._vendor.requests" at 2 places
Replace "analyze" by "vision/v2.0/analyze"

sijithskumar
Автор

example incorrect...code should be:

address = vision_service_address + "vision/v2.0/analyze"

tlynch
Автор

APIs are finally something that I had no idea about, so this video's really valuable to me. I see that you're defining your headers in a dict, but how do you know that a dict is appropriate?
Edit: Oh, I think I get it. It works because requests.post() takes that data in dict form and it puts it in turn into the right format for the API to receive.

JonMW
Автор

I am really enjoying this course so far. But ran into an issue. 
I keep getting {"error":{"code":"404", "message": "Resource not found"}} when trying to access my endpoint for the address of the vision_service_address.
Can't complete the JSON demo.

JeanFrancoisFilion
Автор

Can someone post the link to the documentation where the correct endpoint it specified ?

franksosa
Автор

08/2020
Update for address:
address = vision_service_address + 'vision/v3.0/analyze'

cooljacketboy
Автор

I cannot import this requests library. where to get it from?

Naoori
Автор

Hi can someone please direct me to the course github page?

oran
Автор

Any other suggestion different from azure? They need a card for the free subscription and I only own prepaid cards which they don't accept.

tutatis
Автор

guys, dont forget the '/vision/v2.0/' in the end of your service adress. I got stuck here, but now its all good! :D

the syntax is:

zealotbr
Автор

Hi susan . I’ve been trying this code with central india location and computer vision API but when i tried to upload to local image, the error404 url not found is retrieving back . I checked even the API is active and stable . Please help me out

bhargavaholla
Автор

Azure free period is up, what else can I do? I've played around in Azure before and since my free period is up, I cannot create this API without giving my payment details. Is there a way around this? or another service I could use?

JimLapine
Автор

**HELP**I tried using
image_path = input('URL: ') and
headers = {'Content-Type': 'application/json', 'Ocp-Apim-Subscription-Key': SUBSCRIPTION_KEY}
My intent was to pass on any url of any image from the internet as an input and to display the description of the image. It wouldn't work. OBVIOUSLY. Is it possible to make it work?

sijithskumar
Автор

I can't find the requests library. after i run 'import requests', i get ImportError: cannot import name 'namedtuple' from 'collections' . I tried installing with venv environment, and installing globaly. Did i miss a step?

petercli
Автор

A great video to understand API calling .. I did my own examples and got pretty high accuracy with the Comp Vision API.. thanks!

gcarpanetti
Автор

ModuleNotFoundError: No module named 'requests' :-(

todex
Автор

Very complicated to explain a simple API code..

bendover
Автор

I got the request library but I can't find the json library. Getting the error messages: ERROR: Could not find a version that satisfies the requirement json (from -r requirements.txt (line 3)) (from versions: none)
ERROR: No matching distribution found for json (from -r requirements.txt (line 3))

antoniomartin
welcome to shbcf.ru