ThioJoe / YT-Spammer-Purge

Allows you easily scan for and delete scam comments using several methods.
GNU General Public License v3.0
4.57k stars 389 forks source link

Error Message: local variable 'latestRelease' referenced before assignment #993

Closed sbeaudet closed 1 year ago

sbeaudet commented 1 year ago

Duplicate Issues

What happened?

Did Check for Updates on newest beta 2.17.0-Beta6 and got error X-2

Release version

2.17.0-Beta6

Steps to reproduce

  1. Update to newest beta
  2. Check for Updates

What platform are you seeing this problem on?

Windows (.exe file)

Relevant log output

Traceback (most recent call last):
  File "D:\Users\Joe\Documents\GitHub ThioJoe\YouTube-Spammer-Purge\YTSpammerPurge.py", line 1715, in <module>
  File "D:\Users\Joe\Documents\GitHub ThioJoe\YouTube-Spammer-Purge\YTSpammerPurge.py", line 1692, in main
  File "D:\Users\Joe\Documents\GitHub ThioJoe\YouTube-Spammer-Purge\YTSpammerPurge.py", line 930, in primaryInstance
  File "Scripts\files.py", line 87, in check_lists_update
UnboundLocalError: local variable 'latestRelease' referenced before assignment
------------------------------------------------
Error Message: local variable 'latestRelease' referenced before assignment

Error - Code: X-2 occurred.

Screenshots

No response

Firecul commented 1 year ago

While not particularly useful for you, it seems to be working on the Python version at least. image

ThioJoe commented 1 year ago

Hm odd, the exe seems to work fine for me when checking.

Also looking at the code, it's hard to tell what could possibly have caused that error. Every condition seems to be accounted for. The only possibility I see is if it was specifically an "OSError" that was not accounted for. (The only one I have accounted for is (WinError 10013).

In the latest commit I've added code to handle it and at least print the error from now on. So it will be in the next release whenever that is.

Unfortunately I can't know what the problem was, but it was apparently system related. Perhaps a firewall or local connection issue? Does it still happen now?

ThioJoe commented 1 year ago

Should be addressed in the latest release Beta7