clarkperkins / click-shell

An extension to click that easily turns your click app into a shell utility
BSD 3-Clause "New" or "Revised" License
88 stars 17 forks source link

(py)readline.__doc__ return None on Windows #7

Closed dshlai closed 4 years ago

dshlai commented 7 years ago

Hi! I got this error on Windows using click_shell[windows] extra (pyreadline). It appears that readline.__doc__ or pyreadline.__doc__ return None on Windows.

Traceback (most recent call last):
  File "sqlalchemy_fun.py", line 39, in <module>
    cli()
  File "C:\Users\dennissh\Anaconda3\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\dennissh\Anaconda3\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "C:\Users\dennissh\Anaconda3\lib\site-packages\click_shell\core.py", line 171, in invoke
    return self.shell.cmdloop()
  File "C:\Users\dennissh\Anaconda3\lib\site-packages\click_shell\_cmd.py", line 79, in cmdloop
    if 'libedit' in readline.__doc__:
TypeError: argument of type 'NoneType' is not iterable
ws1088 commented 5 years ago

yup, i got this error too, after I install click-shell[windows]. I just comment these lines out:

            # if 'libedit' in readline.__doc__:
            #     # Special case for mac OSX
            #     to_parse = 'bind ^I rl_complete'
clarkperkins commented 4 years ago

Fixed by #11