Skip to content

Forum in maintenance, we will back soon 🙂

Problem running You...
 
Notifications
Clear all

Problem running Youtube transscript form Hasans newsletter

21 Posts
6 Users
11 Reactions
564 Views
(@stavros)
Posts: 8
Member
Topic starter
 

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

transcription

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).

transcription 2

 

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

 
Posted : 02/16/2024 5:13 pm
shohan and Abdul Malek reacted
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

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

 
Posted : 02/17/2024 12:56 am
shohan reacted
(@stavros)
Posts: 8
Member
Topic starter
 

 

 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

transcription 8

wrong.

 

transcription 7

Thank you very much

This post was modified 9 months ago by stavros
 
Posted : 02/17/2024 8:22 am
shohan reacted
(@husein)
Posts: 534
Member Moderator
 

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 

 

 

 
Posted : 02/17/2024 10:00 am
shohan reacted
(@stavros)
Posts: 8
Member
Topic starter
 

@husein Thanks for your answer. Can you be more specific please How I can do this? thanks

 
Posted : 02/17/2024 5:25 pm
shohan reacted
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 02/17/2024 7:30 pm
Amit Raj and shohan reacted
(@stavros)
Posts: 8
Member
Topic starter
 

Can you guide me further? I already posted my terminal and all procedures. Where am I wrong? Thanks.

 
Posted : 02/17/2024 9:14 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 02/18/2024 3:08 am
Hasan Aboul Hasan
(@admin)
Posts: 1256
Member Admin
 

@stavros in terminal, just run the command

 
Posted : 02/18/2024 10:14 am
(@husein)
Posts: 534
Member Moderator
 

@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.

 
Posted : 02/18/2024 11:53 am
(@stavros)
Posts: 8
Member
Topic starter
 

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

transcription 10

after I run the new command in the terminal "updated" version I see the following

transcription 11

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

 
Posted : 02/19/2024 9:32 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 02/20/2024 1:32 am
(@stavros)
Posts: 8
Member
Topic starter
 

"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."

 
Posted : 02/20/2024 10:45 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 02/21/2024 12:51 am
Hasan Aboul Hasan
(@admin)
Posts: 1256
Member Admin
 

@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

 
Posted : 02/21/2024 9:06 am
(@husein)
Posts: 534
Member Moderator
 

@stavros Did you copy and paste the code as is and it's still not working? what's the last error it gave you?

 
Posted : 02/21/2024 2:58 pm
Dim2001
(@dassa)
Posts: 99
Member
 

I`m getting some error in here. Do I need to get some another API for youtube or?

4
5
 
Posted : 03/17/2024 3:25 am
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 03/17/2024 4:05 am
Dim2001
(@dassa)
Posts: 99
Member
 

@ssadvisor I already did that. but still no luck.

 
Posted : 03/17/2024 4:26 am
(@husein)
Posts: 534
Member Moderator
 

@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
 
Posted : 03/17/2024 12:21 pm
Page 1 / 2
Share: