zackmawaldi / YouTube-shorts-generator

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

UnboundLocalError: local variable 'vid' referenced before assignment #37

Open trimpta opened 7 months ago

trimpta commented 7 months ago

Heres the output, i couldnt figure it out

(shorts-gen) D:\YouTube-shorts-generator-main>python main.py
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 1:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 2:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 3:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 4:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 5:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 6:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 7:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 8:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 9:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...
Logging into Reddit...
Log in success! Retrieving post info...
Scraping reddit success! Returning list of info back to main.
Error occured on 10:
 Traceback (most recent call last):
  File "D:\YouTube-shorts-generator-main\main.py", line 68, in <module>
    success = main()
  File "D:\YouTube-shorts-generator-main\main.py", line 36, in main
    if not vid:
UnboundLocalError: local variable 'vid' referenced before assignment

Retrying...

(shorts-gen) D:\YouTube-shorts-generator-main>
IcedCoffeeDrinker commented 1 month ago

I have the same issue. It only occurs when I change the subreddit though.