Forum in maintenance, we will back soon 🙂
Problem running Youtube transscript form Hasans newsletter
Hi to everyone i could not run the script and I explained.
1. copy the entire code to the clipboard
2. open the visual editor and paste the code
3. in the #inputs field I add my unique API key and paste my YouTube URL ( see a screenshot from the
visual editor )
When I went to the terminal and entered "python app.py", nothing happened (see screenshot). I then clicked the "run" button, but still nothing happened. What could be wrong?
Do I need to add something else to the code like import transcript Somewhere?
In the terminal's problem tab, I see the message 'Import YouTube transcript API could not be resolved' (see screenshot).
I will be pleased if you can help me solve the problem or see the error and how to fix it and run it perfectly.
I await your guidance
Can you give a screenshot of the Terminal output?
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
SSAdvisor thank you for the answer.
I inform you that I repeated the procedure from the beginning with the same result.
I made a new file and then I pasted the "plain text" in this new file.
Αs you can see in the open editor, again on the left after pasting the file, #import necessary libraries" appears and then I get the message to save the file somewhere, so I save it.
Then I put the API and the video in the corresponding fields and run the file either by putting the command "python app.py" or with the back button on the right
the result is always the same in the Terminal it shows a message after I run the file that says "ModuleNotFoundError: No module named 'youtube_transcript_api'" see the screenshot. study the screenshots to see what's
wrong.
Thank you very much
Hello friend, the same problem happened to me. You need to install the module for the import to work. Try this:
pip install youtube-transcript-api
@stavros you do the install from your terminal.
The filename in your code sounds very much like a comment in a file. Maybe you didn't understand something.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
Can you guide me further? I already posted my terminal and all procedures. Where am I wrong? Thanks.
@stavros schedule some time with me. See my signature.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
@stavros Copy the line of code i provided and paste it in your terminal. This way you'll install the package and you'll be able to import it.
Hi first of all thanks for your answer, What I did
1. Run the command
pip install youtube-transcript-api
in terminal first and I see the message from terminal [notice] A new release of pip is available: 23.2.1 -> 24.0
[notice]
To update, run python.exe -m pip install --upgrade pip
so I run the updated version
after I run the new command in the terminal "updated" version I see the following
After replacing the API and also my YouTube URL and clicking on the run button, nothing happens in the terminal. I don't understand what went wrong. Please provide me with some help to do it again maybe is my fault I don't know that's why I keep insisting
@stavros now you need to go back to the program file and run it. What you did recently was to update your environment so that the application can import the module.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
"Sir, I have already updated the environment."
"I have been trying to resolve an issue for the past 4 days and seeking help if possible. As we are supposed to be here to help each other, I would appreciate your assistance. I have tried repeating the same steps multiple times. Firstly, I ran the command to upgrade the environment from the terminal while having the code loaded in a folder. I have done this step about 30 times. Then, I ran the program after inserting the API and YouTube URL. I pressed "run python" from the command of the program (not from the terminal), but nothing happened. I have attached a screenshot again to show you that something is wrong.
To start a new file, I select the Python file option and add the text file code. Then, I add my API key and YouTube URL. Next, I run "pip install youtube-transcript-api" from the terminal to update the application environment. Before running the code, I must save it first. However, when I click on the "run Python file" button, I don't see any transcript in the terminal. I have been asking for help for many days and I'm wondering if there's something wrong with my setup.
I am asking for your help and suggestions on what else I can do to resolve this issue. I feel stuck and need your assistance. Thank you."
@stavros we have given help. Now you need to figure out what is being said. I suggest courses but you have yet to take any of those. Maybe this YouTube video will help.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
@stavros when you run a script, make sure you open the script first.
can you send me a full screenshot of your screen when running and getting nothing
@stavros Did you copy and paste the code as is and it's still not working? what's the last error it gave you?
I`m getting some error in here. Do I need to get some another API for youtube or?
@dassa you need to:
pip install youtube-transcript-api
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
@dassa Please attach a screenshot of your imports. I recently got the same error and I changed the import to:
from youtube_transcript_api import YouTubeTranscriptApi