question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bash shell does not echo typed characters

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • openSUSE Linux 15.1
  • Poetry 1.0.0b3

Issue

The poetry shell command worked fine on my machine for Poetry 0.12.17, but after upgrading to Poetry 1.0.0b3, when I get the shell prompt after running the poetry shell command, the terminal output is broken. The most striking problem is that characters I type are not echoed, but there are other output glitches as well:

poetry@hyperion:~/retroasm> poetry shell
/home/poetry/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
The currently activated Python version 2.7.14 is not supported by the project (^3.6).
Trying to find and use a compatible version. 
Using python3 (3.6.5)
Spawning shell within /home/poetry/.cache/pypoetry/virtualenvs/retroasm-MmrMfn3P-py3.6
poetry@hyperion:~/retroasm> (retroasm-MmrMfn3P-py3.6) poetry@hyperion:~/retroasm

At this point, I can type commands and they are executed, but I don’t see any of the characters I type echoed after the prompt. After running reset my typed input is echoed again.

Note the missing newline at end: that is not a copy-paste error, that actually happens in the terminal. When I execute a command like ls -1, the newline from typing the command does not appear, but the newlines printed by ls do:

(retroasm-MmrMfn3P-py3.6) poetry@hyperion:~/retroasm> LICENSE
README.md
checkdef.py
(snip)

I thought the problem might have to do with the ANSI codes used to produce colors, but while poetry shell --no-ansi does suppress the color output, it doesn’t fix the problem.

The problem is specific to bash: if I start a different shell, it works fine:

poetry@hyperion:~/retroasm> SHELL=ksh poetry shell
/home/poetry/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
The currently activated Python version 2.7.14 is not supported by the project (^3.6).
Trying to find and use a compatible version. 
Using python3 (3.6.5)
Spawning shell within /home/poetry/.cache/pypoetry/virtualenvs/retroasm-MmrMfn3P-py3.6
$ . /home/poetry/.cache/pypoetry/virtualenvs/retroasm-MmrMfn3P-py3.6/bin/activate
(retroasm-MmrMfn3P-py3.6) $ ls -1
LICENSE
README.md
(snip)

I have a git prompt and several completions configured for bash on my normal developer account, so to rule out that those are causing problems I created a new user account and disabled the systemwide bash configurations by renaming the /etc/aliases.d, /etc/bash_completion.d and /etc/profile.d directories. That didn’t fix the problem.

I tried changing the TERM environment variable from xterm-256color to just xterm and to vt100, but that didn’t fix the problem either.

At this point I’m out of ideas for what else I could be trying to diagnose this problem. If anyone has a clue, please comment.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:7

github_iconTop GitHub Comments

10reactions
dmarinuswoodwingcommented, Oct 29, 2019

I have the same problem, it seems to be introduced in Poetry 1.0.0b2

I can workaround it by blindly typing reset after entering the shell.

2reactions
Toruitascommented, Oct 30, 2019

Thirding this problem. The bug is present in various Bash terminals, including the PyCharm one. Poetry 1.0.0b3 on Ubuntu 18. I can confirm the reset workaround, as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bash - Shell does not show typed in commands, "reset" works ...
When running a shell or most programs in a shell anything you type is echo'd back to the user's terminal by the kernel's...
Read more >
Special Characters and Quoting - Learning the bash ... - O'Reilly
The most obvious situation where you might need to quote a string is with the echo command, which just takes its arguments and...
Read more >
Echo tab characters in bash script - Stack Overflow
Show activity on this post. Use printf , not echo . There are multiple different versions of the echo command. There's /bin/echo (which...
Read more >
How do I restore input echoing in the terminal? - Super User
To see all your terminal settings, run stty -a . While the input was hidden, that should show -echo somewhere in the output....
Read more >
Characters do not echo in OS X terminal unless I hit the delete ...
Firstly, look at Terminal preferences ( Cmd + , )for the font, text and color settings and change them appropriately. This may not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found