at 7:24 when i type code . in my command prompt it shows " 'code' is not recognized as an internal or external command, operable program or batch file." Can u please help me with this @Jie Jenn and can u also pls tell me about the editor that u said vsco or something , iam new to this environment and need your help in this
I too was facing the same issue. After trying all sorts of things, I found that the solution lies in opening the Command Propmpt as administrator, navigating to the project directory and then issuing the "code ." command to launch Visual Sudio Code.
At 11:11, how did you manage to run this in the venv in the terminal? "(VisionAPIDemo) ........" In my case its simply just the path without the (VisionAPIDemo)
In VS Code, add this property to your keybinding file to assign terminal clear action to shortcut key Ctrl + K { "key": "ctrl+k", "command": "workbench.action.terminal.clear" },
Hey, @Jie Jenn Thank you for the guide. Can you explain what exactly you did at 11:06? You hit run and debug or run it as a script, I'll be glad if you tell me how you run it as a script.
@@jiejenn, You rock thank you for your rapid response. Is that you(Ctrl + Shift + B ) did work the same with just a Shift + Enter? Is there any difference between Run Build Task and Python: Run Selection?
I'm tracking with you, it was just a little confusing when you kept referring to "Python Venv" as "Python V-en-v" instead of "Python Virtual Environment"..I know it's a small gripe. All-in-all, this so far has been a very informative tutorial series and it's helping me immensely with my Udacity ML capstone project. Thank you!!
I too was facing the same issue. After trying all sorts of things, I found that the solution lies in opening the Command Propmpt as administrator, navigating to the project directory and then issuing the "code ." command to launch Visual Sudio Code.
Hey @Jie Jenn i got a problem in my code there is an error like this ImportError: cannot import name 'types' from 'google.cloud.vision' can you help me please
Here are some problems I faced and how I solved it First of all make sure you pip install the packages mentioned pip install google-cloud pip install google-cloud-vision pip install google-api-python-client If the "google" module is not found, it can be solved by making the venv active. Not only in the command prompt but also at the visual studio code. Todo that see the left bottom corner of the visual studio if it was like python 3.7.4 the click that enter the path to your venv and enter now it will be changed to python 3.7.4("your virtual environment name":venv) Now the module problem would be solved(hope😅) While running the program you would run into this type of error "access denied" something like that it could be a cause of not signing into the console and giving your credit/debit card details make sure you give those.
I followed this video a couple times and keep getting the same error which is: "client : The term 'client' is not recognized as the name of a cmdlet, function, script file,.....". I know this is a very board error, but do you have any idea what this error might be? My script is a direct copy of yours besides my json file is named differently. Thanks
@@jiejenn I have the same problem. Another problem I have is that the ['GOOGLE_APPLICATION_CREDENTIALS'] text is red instead of the light pink yours has. It might be correlated with the issues of not being able to use the command "client".
When I run my python file, it runs activate.ps1. your code ran activate.bat. the error I get on following the video says that 'keyname.json' was not found though I have followed the same structure and followed the same path name also as the video.
is any one having an error code - ModuleNotFoundError: No module named 'google' - im using windows 10, and vs code. Everything works fine until 11:11 can any one help out?
@@jiejenn I have installed google-cloud library pretty sure cloud-vision is in google-cloud, no? Im not sure if i need to set a specific path to the library or maybe its looking in a different place. Since my python application is in local\ maybe that's the problem?
I also experienced the same problem, and I followed all previous steps. Perhaps my VS is not properly setup? as it does not also recognizes google definitions...
Hello, I'm a mac user. When I run the code I get the following error File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/locale.py", line 608, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting bash-3.2$ I've search on internet but I couldn't find any answer...
is it possible to run the python code for vision api in an IDE like PyCharm ? What do we need to do to set the google cloud authentication using json file for running in an IDE?
Anaconda suele trabajar con sus propios entornos. Lo creas con conda create --name myenv, luego en vscode asegúrate que tienes ese entorno. Desde cmd ejecutas conda info --envs para que puedas visualizar la ruta de tu entorno base de anaconda (cópiela) y desde el explorador de windows encuentra a Anaconda Prompt y pega tu ruta, añades seguidamente \Scripts\activate base y das enter. Ve a la carpeta donde tienes tu proyecto y abre la terminal y ejecutas conda activate --stack myenv Myenv es el nombre que le has dado en un inicio a tu entorno en anaconda. Con esto último estará ejecutando de manera anidada el entorno base y tu nuevo entorno. Si deseas conocer más este enlace te puede servir conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment
Hey, how did you get that VisionApi folder ? Im working on a project and need to use the google vision API for the same So need help with the installation
Hi, can you make a video about how to set GOOGLE_APPLICATION_CREDENTIALS ? i was follow the tutorials from google and set export GOOGLE_APPLICATION_CREDENTIALS="[PATH]" (Path was change to JSON file) in venv, but i still get error 'GOOGLE_APPLICATION_CREDENTIALS' is not defined
@Aaron Chen I have never used IOS before, so the only thing I think will help is Google's help page. I have linked the page below. cloud.google.com/docs/authentication/getting-started
@@jiejenn I too was facing the same issue. After trying all sorts of things, I found that the solution lies in opening the Command Propmpt as administrator, navigating to the project directory and then issuing the "code ." command to launch Visual Sudio Code.
Update:
Looks like Google updated the Google Vision AI library. When you import the module, please change the module name from vision to vision_v1
It is saying python not found
What should I do if when I write the line "from google.cloud import vision", the answer is that "No module name Google"?
The hardest part of programming is naming things
was struggling all day with this... thank you
at 7:24 when i type code . in my command prompt it shows " 'code' is not recognized as an internal or external command,
operable program or batch file."
Can u please help me with this @Jie Jenn and can u also pls tell me about the editor that u said vsco or something , iam new to this environment and need your help in this
I also have the same issue sir...please help me out
the editor is called VSCode if you install it then the code command should work
i got an error, it says:
no name 'types' in module 'google.cloud.vision' pylint(no-name-in-module) [3, 1]
Same issue
try image = vision.Image(content=content) instead image = vision.type.Image(content=content)
I too was facing the same issue. After trying all sorts of things, I found that the solution lies in opening the Command Propmpt as administrator, navigating to the project directory and then issuing the "code ." command to launch Visual Sudio Code.
At 11:11, how did you manage to run this in the venv in the terminal? "(VisionAPIDemo) ........" In my case its simply just the path without the (VisionAPIDemo)
Same issue with me. Did you get a resolution for this ?
How did you clear your python's shell ? 11:15
In VS Code, add this property to your keybinding file to assign terminal clear action to shortcut key Ctrl + K
{
"key": "ctrl+k",
"command": "workbench.action.terminal.clear"
},
Hello man I need your help where you make Service Key, it says service account for me when I have one. What should I do? At 3:23
thank you! even thoght a few things changed since you made the video, it was still the most helpfull tutorial i found online
Hey, @Jie Jenn Thank you for the guide. Can you explain what exactly you did at 11:06? You hit run and debug or run it as a script, I'll be glad if you tell me how you run it as a script.
In VS Code, you can run Python script one line at a time. I selected the code block that I want to execute, Ctrl + Shift + B to run the code.
@@jiejenn, You rock thank you for your rapid response.
Is that you(Ctrl + Shift + B ) did work the same with just a Shift + Enter? Is there any difference between Run Build Task and Python: Run Selection?
@@theorager15 same command.
I'm tracking with you, it was just a little confusing when you kept referring to "Python Venv" as "Python V-en-v" instead of "Python Virtual Environment"..I know it's a small gripe. All-in-all, this so far has been a very informative tutorial series and it's helping me immensely with my Udacity ML capstone project. Thank you!!
when in the command prompt you write python -m venv VisionAPIDemo in the minute 5:39 it throws me an error saying that python is not a command
Make sure you are in the command prompt when creating a virtual environment.
thank you.
sudo apt-get install python3-venv try that
Hi when i run the code, always says No module named 'google.cloud' . But i already installed it. What could be?
The Library is google-cloud-vision
I too was facing the same issue. After trying all sorts of things, I found that the solution lies in opening the Command Propmpt as administrator, navigating to the project directory and then issuing the "code ." command to launch Visual Sudio Code.
Hey @Jie Jenn i got a problem in my code there is an error like this ImportError: cannot import name 'types' from 'google.cloud.vision' can you help me please
did you find the solution ?
file is not downloading when account is created
Here are some problems I faced and how I solved it
First of all make sure you pip install the packages mentioned
pip install google-cloud
pip install google-cloud-vision
pip install google-api-python-client
If the "google" module is not found, it can be solved by making the venv active. Not only in the command prompt but also at the visual studio code. Todo that see the left bottom corner of the visual studio if it was like python 3.7.4 the click that enter the path to your venv and enter now it will be changed to python 3.7.4("your virtual environment name":venv)
Now the module problem would be solved(hope😅)
While running the program you would run into this type of error "access denied" something like that it could be a cause of not signing into the console and giving your credit/debit card details make sure you give those.
Thanks Bro..😁
Amazing.. thank you
I followed this video a couple times and keep getting the same error which is: "client : The term 'client' is not recognized as the
name of a cmdlet, function, script file,.....". I know this is a very board error, but do you have any idea what this error might be? My script is a direct copy of yours besides my json file is named differently. Thanks
What is your py file name? And what editor are you using? Are you sure you are importing libraries from the correct folder?
@@jiejenn hi I am also getting the same error Help plz!
@@jiejenn I have the same problem. Another problem I have is that the ['GOOGLE_APPLICATION_CREDENTIALS'] text is red instead of the light pink yours has. It might be correlated with the issues of not being able to use the command "client".
I fixed it. You need to copy the code into your terminal window after you've copy and pasted the directory to your pythonfile.
@@ludvig4752 How exactly you did that?
When I run my python file, it runs activate.ps1. your code ran activate.bat. the error I get on following the video says that 'keyname.json' was not found though I have followed the same structure and followed the same path name also as the video.
you should not use vscode console
use windows cmd to activate environment and run python pile
is any one having an error code - ModuleNotFoundError: No module named 'google' - im using windows 10, and vs code. Everything works fine until 11:11 can any one help out?
Have you installed the vision AI library? (pip install google-cloud-vision)
@@jiejenn I have installed google-cloud library pretty sure cloud-vision is in google-cloud, no? Im not sure if i need to set a specific path to the library or maybe its looking in a different place. Since my python application is in local\ maybe that's the problem?
@@yuriyk4937 Did you Found any Solution?
I also experienced the same problem, and I followed all previous steps. Perhaps my VS is not properly setup? as it does not also recognizes google definitions...
did Google vision Api is OCR hand written Text?
Hello, I'm a mac user. When I run the code I get the following error
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/locale.py", line 608, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
bash-3.2$
I've search on internet but I couldn't find any answer...
I'm having the error cannot import name 'types' from 'google.cloud.vision'
is it possible to run the python code for vision api in an IDE like PyCharm ? What do we need to do to set the google cloud authentication using json file for running in an IDE?
PyCharm is just another IDE, so yes, you can run the Vision AI package in PyCharm. I don't use PyCharm, so unfortunately I can't help you there.
@@jiejenn thx. i got the answer from your video 3. your videos are wonderful!
Do you all guys pay for the Google Cloud services? Is there any way to wave the fees? How much do you pay for the Vision API Service?
instance of 'imageannotatorclient' has no 'text_detection' member......someone pls help me with this error
i have anaconda and thats why i am not able to do some steps what should I do? Will I have to download python separately?
Not sure. I don't have experience working with Anaconda.
@@jiejenn ohh fine i figured that out.... thanks.... this video was pretty helpful
Anaconda suele trabajar con sus propios entornos. Lo creas con conda create --name myenv, luego en vscode asegúrate que tienes ese entorno. Desde cmd ejecutas conda info --envs para que puedas visualizar la ruta de tu entorno base de anaconda (cópiela) y desde el explorador de windows encuentra a Anaconda Prompt y pega tu ruta, añades seguidamente \Scripts\activate base y das enter. Ve a la carpeta donde tienes tu proyecto y abre la terminal y ejecutas conda activate --stack myenv
Myenv es el nombre que le has dado en un inicio a tu entorno en anaconda. Con esto último estará ejecutando de manera anidada el entorno base y tu nuevo entorno.
Si deseas conocer más este enlace te puede servir
conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment
Hey, how did you get that VisionApi folder ?
Im working on a project and need to use the google vision API for the same
So need help with the installation
Which folder are you referring to?
@@jiejenn hey understood that part but i am unable to create the virtual environment to run pip
@@jiejenn Also can i use the anaconda prompt and do all of this work in Jupyter notebook
@@jiejenn pip command runs into error while executing .. it says found cython generated files
Great tutorial. Thank you!
Thanks for the awesome video.
Thanks!! This helps me a lot!
Glad the video helped.
Thannks very much for this stuff!
Hi, can you make a video about how to set GOOGLE_APPLICATION_CREDENTIALS ? i was follow the tutorials from google and set export GOOGLE_APPLICATION_CREDENTIALS="[PATH]" (Path was change to JSON file) in venv, but i still get error 'GOOGLE_APPLICATION_CREDENTIALS' is not defined
the only thing i can do is to add GOOGLE_APPLICATION_CREDENTIALS="[PATH]" in the code.
Which operation system are you using?
@@jiejenn MacOS
@Aaron Chen I have never used IOS before, so the only thing I think will help is Google's help page. I have linked the page below.
cloud.google.com/docs/authentication/getting-started
@@jiejenn Thank you very much, i think i figure it out.
You're awesome. Thanks for this
i am gettint the error ScriptAccountToken.json was npt found even though it is located in the same folder as demo,py is located..somebody help
if you print os.getcwd(), is the token file in the same folder as your working directory?
@@jiejenn where to type that
my error is no module named 'google.cloud'
when i run from google.cloud import vision
how can i fix it?
There could be a chance you haven't install the library. Try to install the Vision library with this command
pip install --upgrade google-cloud-vision
@@jiejenn thank you!!
@@jiejenn even after installing it still shows the same error
: Import "google.cloud" could not be resolved please help me out
@@jiejenn I too was facing the same issue. After trying all sorts of things, I found that the solution lies in opening the Command Propmpt as administrator, navigating to the project directory and then issuing the "code ." command to launch Visual Sudio Code.
how to do the same thing in ubuntu?
How to fix them?
Import "google.cloud" could not be resolved
Import "google.cloud.vision" could not be resolved
You can access Google.py source here learndataanalysis.org/google-py-file-source-code/
@@jiejenn It works. Thanks.
my problem is always unresolved import 'google.cloud'
Have you installed the vision AI library? (pip install google-cloud-vision)
@@jiejenn yes, i solved it by doing it again and again and the solution was to pip install the google cloud in the admin powershell
It's giving me error that Google module not found
check description for the source code to Google.py file.
service account key
your python version
my "settings.json" is empty, what can ı do?