prompt-toolkit / python-prompt-toolkit

Library for building powerful interactive command line applications in Python
https://python-prompt-toolkit.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
9.28k stars 715 forks source link

Problems with using pgcli #557

Open Crackpot opened 6 years ago

Crackpot commented 6 years ago

The following error occurs above the 1.0.0 version: -> % pgcli -h localhost -p 5432 -U postgres -W Password: Traceback (most recent call last): File "/usr/bin/pgcli", line 9, in load_entry_point('pgcli==0.20.1', 'console_scripts', 'console')() File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke return callback(args, **kwargs) File "/usr/share/pgcli/pgcli/main.py", line 595, in cli pgcli.run_cli() File "/usr/share/pgcli/pgcli/main.py", line 278, in run_cli self.cli = self._build_cli() File "/usr/share/pgcli/pgcli/main.py", line 408, in _build_cli cli = CommandLineInterface(application=application) File "/usr/local/lib/python3.5/dist-packages/prompt_toolkit/interface.py", line 67, in init assert isinstance(eventloop, EventLoop) AssertionError

When I install version 0.59, I can use it properly sudo pip install prompt_toolkit==0.59
-> % pgcli -h localhost -p 5432 -U postgres -W Password: Version: 0.20.1 Chat: https://gitter.im/dbcli/pgcli Mail: https://groups.google.com/forum/#!forum/pgcli Home: http://pgcli.com postgres>

decentral1se commented 6 years ago

Hi there, this seems to be an issue in pgcli and not the toolkit here.

Those assert statements are to help developers catch their programming errors.

In any case, the toolkit is way beyond that version reported in this ticket.

https://github.com/jonathanslenders/python-prompt-toolkit/releases/tag/2.0.3