Local-File-Organizer
Local-File-Organizer copied to clipboard
Loop after file analysys
I tried the script by analyzing 2 images (1 png, 1 jpg) and after computation finishes the terminal loops with the following message repeated without allowing any input:
TypeError: cannot unpack non-iterable NoneType object
Please enter 'yes' or 'no'. To exit, type '/exit'.
Readline internal error
Traceback (most recent call last):
File "C:\Users\xxx\.conda\envs\local_file_organizer\Lib\site-packages\pyreadline3\console\console.py", line 842, in hook_wrapper_23
res = ensure_str(readline_hook(prompt))
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxx\.conda\envs\local_file_organizer\Lib\site-packages\pyreadline3\rlmain.py", line 603, in readline
self.readline_setup(prompt)
File "C:\Users\xxx\.conda\envs\local_file_organizer\Lib\site-packages\pyreadline3\rlmain.py", line 599, in readline_setup
self._print_prompt()
File "C:\Users\xxx\.conda\envs\local_file_organizer\Lib\site-packages\pyreadline3\rlmain.py", line 501, in _print_prompt
n = c.write_scrolling(self.prompt, self.prompt_color)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxx\.conda\envs\local_file_organizer\Lib\site-packages\pyreadline3\console\console.py", line 337, in write_scrolling
w, h = self.size()
^^^^
I've got the same error. Looking at the full error message, it seems to be coming from the function get_yes_no()
Without looking at the function call in depth, a quick fix would be to change the code at:
- Line 295:
proceed = get_yes_no("Would you like to proceed with these changes? (yes/no): ")toproceed = True - Line 334:
another_directory = get_yes_no("Would you like to organize another directory? (yes/no): ")toanother_directory = False
It'll work after this.