YT-Spammer-Purge icon indicating copy to clipboard operation
YT-Spammer-Purge copied to clipboard

'shutil' is not defined

Open PacoBell opened this issue 3 months ago • 3 comments

Duplicate Issues

  • [X] There are no existing posts relating to my problem
  • [ ] There are existing posts relating to my problem, but the solution given, doesn't work for me.

What happened?

YT-Spammer-Purge-2.18.0-Beta3 Termux on Android 14

File "/storage/emulated/0/Download/YTSP/YT-Spammer-Purge-2.18.0-Beta3/Scripts/logging.py", line 769, in add_sample consoleWidth = utils.get_terminal_size() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/storage/emulated/0/Download/YTSP/YT-Spammer-Purge-2.18.0-Beta3/Scripts/utils.py", line 177, in get_terminal_size return shutil.get_terminal_size().columns ^^^^^^ NameError: name 'shutil' is not defined

You need to "import shutil" somewhere. That is all.

Release version

2.18.0-Beta3

Steps to reproduce

  1. Run YTSP
  2. Press Enter to display comments
  3. Sadness

What platform are you seeing this problem on?

Linux (can also be ChromeOS)

Relevant log output

Traceback (most recent call last):
  File "/storage/emulated/0/Download/YTSP/YT-Spammer-Purge-2.18.0-Beta3/YTSpammerPurge.py", line 1721, in <module>
    main()
  File "/storage/emulated/0/Download/YTSP/YT-Spammer-Purge-2.18.0-Beta3/YTSpammerPurge.py", line 1698, in main      continueRunning = primaryInstance(miscData)                               ^^^^^^^^^^^^^^^^^^^^^^^^^           File "/storage/emulated/0/Download/YTSP/YT-Spammer-Purge-2.18.0-Beta3/YTSpammerPurge.py", line 1333, in primaryInstance                                                   logFileContents, logMode = logging.print_comments(current, config, scanVideoID, loggingEnabled, scanMode, logMode)                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                    File "/storage/emulated/0/Download/YTSP/YT-Spammer-Purge-2.18.0-Beta3/Scripts/logging.py", line 28, in print_comments                                                     j, commentsContents = print_prepared_comments(current, commentsContents, scanVideoID, list(current.matchedCommentsDict.keys()), j, loggingEnabled, scanMode, logMode, doWritePrint, matchReason="Filter Match")                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^               File "/storage/emulated/0/Download/YTSP/YT-Spammer-Purge-2.18.0-Beta3/Scripts/logging.py", line 332, in print_prepared_comments                                           add_sample(current, author_id_local, author, text, matchReason, matchedText, longestAuthorNameLength)         File "/storage/emulated/0/Download/YTSP/YT-Spammer-Purge-2.18.0-Beta3/Scripts/logging.py", line 769, in add_sample                                                        consoleWidth = utils.get_terminal_size()                               ^^^^^^^^^^^^^^^^^^^^^^^^^              File "/storage/emulated/0/Download/YTSP/YT-Spammer-Purge-2.18.0-Beta3/Scripts/utils.py", line 177, in get_terminal_size                                                   return shutil.get_terminal_size().columns                      ^^^^^^                                       NameError: name 'shutil' is not defined                 ------------------------------------------------

Screenshots

No response

PacoBell avatar Mar 30 '24 19:03 PacoBell