zackmawaldi / YouTube-shorts-generator

Automatically download Reddit videos, edit them, and upload them to YouTube.
MIT License
323 stars 62 forks source link

Traceback issues with config file #4

Closed elabdi closed 1 year ago

elabdi commented 2 years ago

Hi dear zack, first thing thank you for making this great solution, second thing I'm having issues making it work on ec2, the error I'm getting for the moment is : Traceback (most recent call last): File "C:\Users\Administrator\Desktop\YouTube-shorts-generator\main.py", line 8, in subreddit = config.subreddit # subreddit wanted here NameError: name 'config' is not defined.

I tried fixing it but no success, also i want to know if i can use it on my lap either than ec2. Best Regards

manashan commented 2 years ago

I replaces config.subreddit with "funny". But right now getting reddit api key error

elabdi commented 2 years ago

I replaces config.subreddit with "funny". But right now getting reddit api key error

I did that aswell but no success

manashan commented 2 years ago

I replaces config.subreddit with "funny". But right now getting reddit api key error

I did that aswell but no success

Dont forget to add " " I am getting this error since yesterday. Do you have any idea? I really want to work with this script.

https://user-images.githubusercontent.com/67643821/165013403-74e64267-c761-40fb-a6a9-614ef0844889.jpg

elabdi commented 2 years ago

I replaces config.subreddit with "funny". But right now getting reddit api key error

I did it like you but i received new error out of range :

line 24, in reddit.url = vid_list[x][0] IndexError: list index out of range

elabdi commented 2 years ago

I replaces config.subreddit with "funny". But right now getting reddit api key error

I did that aswell but no success

Dont forget to add " " I am getting this error since yesterday. Do you have any idea? I really want to work with this script.

https://user-images.githubusercontent.com/67643821/165013403-74e64267-c761-40fb-a6a9-614ef0844889.jpg

Yes i did it with quotes, Are you running the main py or the scarper.Py and did you fulfill the config file with credentials?

manashan commented 2 years ago

I replaces config.subreddit with "funny". But right now getting reddit api key error

I did that aswell but no success

Dont forget to add " " I am getting this error since yesterday. Do you have any idea? I really want to work with this script.

https://user-images.githubusercontent.com/67643821/165013403-74e64267-c761-40fb-a6a9-614ef0844889.jpg

Yes i did it with quotes,

Are you running the main py or the scarper.Py and did you fulfill the config file with credentials?

I am running the main py. I put them in config and redditlogin.txt. Basically everywhere. This script would work awesome without API i guess

elabdi commented 2 years ago

I replaces config.subreddit with "funny". But right now getting reddit api key error

I did that aswell but no success

Dont forget to add " " I am getting this error since yesterday. Do you have any idea? I really want to work with this script.

https://user-images.githubusercontent.com/67643821/165013403-74e64267-c761-40fb-a6a9-614ef0844889.jpg

Yes i did it with quotes, Are you running the main py or the scarper.Py and did you fulfill the config file with credentials?

I am running the main py. I put them in config and redditlogin.txt. Basically everywhere. This script would work awesome without API i guess

Try again from scratch, also are running it on your machine or amazon ec2 ?

manashan commented 2 years ago

I replaces config.subreddit with "funny". But right now getting reddit api key error

I did that aswell but no success

Dont forget to add " " I am getting this error since yesterday. Do you have any idea? I really want to work with this script.

https://user-images.githubusercontent.com/67643821/165013403-74e64267-c761-40fb-a6a9-614ef0844889.jpg

Yes i did it with quotes,

Are you running the main py or the scarper.Py and did you fulfill the config file with credentials?

I am running the main py. I put them in config and redditlogin.txt. Basically everywhere. This script would work awesome without API i guess

Try again from scratch, also are running it on your machine or amazon ec2 ?

I will try to work tonight. On my machine Windows 10. Wbu?

elabdi commented 2 years ago

I replaces config.subreddit with "funny". But right now getting reddit api key error

I did that aswell but no success

Dont forget to add " " I am getting this error since yesterday. Do you have any idea? I really want to work with this script.

https://user-images.githubusercontent.com/67643821/165013403-74e64267-c761-40fb-a6a9-614ef0844889.jpg

Yes i did it with quotes,

Are you running the main py or the scarper.Py and did you fulfill the config file with credentials?

I am running the main py. I put them in config and redditlogin.txt. Basically everywhere. This script would work awesome without API i guess

Try again from scratch, also are running it on your machine or amazon ec2 ?

I will try to work tonight. On my machine Windows 10. Wbu?

I'm using ec2 as he advised on the requirements section, i will try to run it aswell on my machine tonight, if you found any other solution like this one (auto YouTube shorts) let me know and i will let you know aswell.

zackmawaldi commented 2 years ago

@elabdi @manashan I'll be happy to go on discord and try fix the issues. I'm currently busy with finals, so I won't be free until next weekend. I'm interested to see the root of the errors.

For the main.py, it was missing import config. The config file was untested when I added to the code. It was my attempt at making the script more universally accessible, since I didn't intend. on publishing it. I did update the file to include the import.

For the error mentioned in this issue thread @elabdi :

line 24, in reddit.url = vid_list[x][0] IndexError: list index out of range

This means that the reddit_scraper.py wasn't able to pull posts into output off the function. Try printing out the output before line 40 in reddit_scraper.py and let me know if that's the case. Otherwise I think x=100 should be changed to x=len(vid_list) in main.py.

elabdi commented 2 years ago

@elabdi @manashan I'll be happy to go on discord and try fix the issues. I'm currently busy with finals, so I won't be free until next weekend. I'm interested to see the root of the errors.

For the main.py, it was missing import config. The config file was untested when I added to the code. It was my attempt at making the script more universally accessible, since I didn't intend. on publishing it. I did update the file to include the import

For the error mentioned in this issue thread @elabdi :

line 24, in reddit.url = vid_list[x][0] IndexError: list index out of range

This means that the reddit_scraper.py wasn't able to pull posts into output off the function. Try printing out the output before line 40 in reddit_scraper.py and let me know if that's the case.

Hi zack thank you for your help and support 🙂, yes of course it would be awesome if we can discuss in discord

elabdi commented 2 years ago

Zack have you made the discord server yet ? if you did let me in

zackmawaldi commented 2 years ago

@elabdi @manashan Thanks for your guys' patience. I just made the discord server. I'm on US east coast time zone. Happy to talk there :) https://discord.gg/kCMAmyE8