freyta / WWE-Network-Downloader

My own WWE downloader.
40 stars 13 forks source link

Getting "UnboundLocalError: local variable 'subtitle_stream' referenced before assignment" #45

Open str8edge-x64 opened 3 months ago

str8edge-x64 commented 3 months ago

While trying to download a section from some shows, I get this error:

Succesfully logged in
Traceback (most recent call last):
  File "C:\Users\\WWE-Network-Downloader-master\main.py", line 109, in <module>
    stream_url = account.m3u8_stream(video_link[1])
  File "C:\Users\\WWE-Network-Downloader-master\wwe.py", line 103, in m3u8_stream
    return stream['hls'][0]['url'], subtitle_stream, chapters
UnboundLocalError: local variable 'subtitle_stream' referenced before assignment

How I could fix it:

added this line before the for loop in line 93

    subtitle_stream = None