Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loop after file analysys #29

Open
adripo opened this issue Oct 11, 2024 · 1 comment
Open

Loop after file analysys #29

adripo opened this issue Oct 11, 2024 · 1 comment

Comments

@adripo
Copy link

adripo commented Oct 11, 2024

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()
    ^^^^
@poonchuanan
Copy link

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): ") to proceed = True
  • Line 334: another_directory = get_yes_no("Would you like to organize another directory? (yes/no): ") to another_directory = False

It'll work after this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants