InputMode.REPLACE_SINGLE unhandled exception
See original GitHub issueDescription
pgcli throws an unhandled exception upon trying to perform a REPLACE_SINGLE operation when pressing “r” in vim normal mode
Unhandled exception in event loop:
File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/eventloop/utils.py", line 72, in schedule
func()
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 469, in redraw
self._redraw()
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 536, in _redraw
self.context.run(run_in_context)
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 522, in run_in_context
self.renderer.render(self, self.layout)
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/renderer.py", line 629, in render
layout.container.preferred_height(size.columns, size.rows).preferred,
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 325, in preferred_height
dimensions = [
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 326, in <listcomp>
c.preferred_height(width, max_available_height) for c in self._all_children
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 2598, in preferred_height
return self.content.preferred_height(width, max_available_height)
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 1623, in preferred_height
return self._merge_dimensions(
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 1651, in _merge_dimensions
preferred = get_preferred()
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 1616, in preferred_content_height
return self.content.preferred_height(
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 379, in preferred_height
content = self.create_content(width, None)
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 392, in create_content
fragments_with_mouse_handlers = self._get_formatted_text_cached()
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 358, in _get_formatted_text_cached
return self._fragment_cache.get(
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/cache.py", line 41, in get
value = getter_func()
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 359, in <lambda>
get_app().render_counter, lambda: to_formatted_text(self.text, self.style)
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/formatted_text/base.py", line 78, in to_formatted_text
return to_formatted_text(value(), style=style)
File "/home/iz/.local/lib/python3.8/site-packages/prompt_toolkit/formatted_text/base.py", line 78, in to_formatted_text
return to_formatted_text(value(), style=style)
File "/usr/share/pgcli/pgcli/pgtoolbar.py", line 43, in get_toolbar_tokens
("class:bottom-toolbar", "[F4] Vi-mode (" + _get_vi_mode() + ")")
File "/usr/share/pgcli/pgcli/pgtoolbar.py", line 8, in _get_vi_mode
return {
- Please provide your OS and version information. Ubuntu 20.04
- Please provide your CLI version. Version: 2.2.0
- What is the output of
pip freeze
command:
alembic==1.1.0.dev0
apturl==0.5.2
Babel==2.6.0
bcrypt==3.1.7
blinker==1.4
Brlapi==0.7.0
certifi==2019.11.28
chardet==3.0.4
chrome-gnome-shell==0.0.0
cli-helpers==2.1.0
Click==7.0
colorama==0.4.3
command-not-found==0.3
configobj==5.0.6
cryptography==2.8
cupshelpers==1.0
dbus-python==1.2.16
defer==1.0.6
distro==1.4.0
distro-info===0.23ubuntu1
entrypoints==0.3
Flask==1.1.1
Flask-BabelEx==0.9.3
Flask-Compress==1.4.0
Flask-Gravatar==0.4.2
Flask-Login==0.4.1
Flask-Mail==0.9.1
Flask-Migrate==2.5.2
Flask-Paranoid==0.2.0
Flask-Principal==0.4.0
Flask-Security-Too==3.4.2
Flask-SQLAlchemy==2.1
Flask-WTF==0.14.2
greenlet==0.4.15
httplib2==0.14.0
humanize==1.0.0
idna==2.8
isc==2.0
itsdangerous==1.1.0
Jinja2==2.10.1
keyring==18.0.1
language-selector==0.1
launchpadlib==1.10.13
lazr.restfulclient==0.14.2
lazr.uri==1.0.3
ldap3==2.4.1
louis==3.12.0
macaroonbakery==1.3.1
Mako==1.1.0
MarkupSafe==1.1.0
msgpack==0.6.2
netifaces==0.10.4
oauthlib==3.1.0
paramiko==2.6.0
passlib==1.7.2
pgcli==3.0.0
pgspecial==1.11.10
ply==3.11
prompt-toolkit==3.0.8
protobuf==3.6.1
psutil==5.5.1
psycopg2==2.8.5
pyasn1==0.4.2
pycairo==1.16.2
pycups==1.9.73
Pygments==2.3.1
PyGObject==3.36.0
pyinotify==0.9.6
PyJWT==1.7.1
pymacaroons==0.13.0
PyNaCl==1.3.0
pynvim==0.4.1
pyOpenSSL==19.0.0
pyRFC3339==1.1
python-apt==2.0.0+ubuntu0.20.4.1
python-dateutil==2.7.3
python-debian===0.1.36ubuntu1
pytz==2019.3
pyxdg==0.26
PyYAML==5.3.1
requests==2.22.0
requests-unixsocket==0.2.0
rofication==1.2.2
SecretStorage==2.3.1
setproctitle==1.1.10
simplejson==3.16.0
six==1.14.0
speaklater==1.4
SQLAlchemy==1.3.12
sqlparse==0.3.1
sshtunnel==0.1.4
systemd-python==234
tabulate==0.8.6
terminaltables==3.1.0
ubuntu-advantage-tools==20.3
ubuntu-drivers-common==0.0.0
ufw==0.36
unattended-upgrades==0.1
urllib3==1.25.8
wadllib==1.3.3
wcwidth==0.1.8
Werkzeug==0.16.1
WTForms==2.2.1
xkit==0.0.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
litecli crashes when trying to replace a char in vi mode #96
After setting key_bindings = vi in the config.file, everytime I hit r, instead of entering in single char replace mode, a loop of...
Read more >inputmode - HTML: HyperText Markup Language | MDN
The inputmode global attribute is an enumerated attribute that hints at the type of data that might be entered by the user while...
Read more >Everything You Ever Wanted to Know About inputmode
The inputmode global attribute provides a hint to browsers for devices with onscreen keyboards to help them decide which keyboard to display ...
Read more >Potential to use ssh keys for sftp - PHP panel - GitAnswer
Per a request in the #feedback channel using ssh keys could be a good enhancement for the new daemon. Back burner for now...
Read more >Crash in vi mode issue - PythonTechWorld
Description. Pressed r to replace a single character in vi mode, got this: Unhandled exception in event loop: File "/usr/lib/python3.8/asyncio/events.py", ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can confirm upgrading prompt-toolkit to 3.0.19 then pip install’ing pgcli (3.1.0) solved the problem (on ubuntu 20.04, python 3.8)
I can confirm it is not fixed. I pip installed from master.
pgcli --version
reports Version: 3.1.0. If I enablevi = True
in the pgcli config file, then I get the error as soon as I start pgcli. Also using Ubuntu 20.04 LTS on WSL.