Comments (3)
Hi,
the error message gives a clue that there appear to be some unexpected escape sequences in the output:
invalid literal for int() with base 10: '2004l\rexit\necho $?\n'
The interesting part is the 2004l
and that's an escape sequence related to bracketed paste mode. I really have no clue how this could be related to using a venv or not, but I did notice that I can produce a similar failure on my system when using the new pytest testsuite:
❯ python -m pytest selftest/ -k 'test_simple_output' -v
===================================== test session starts ======================================
platform linux -- Python 3.9.4, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /home/rahix/Documents/Development/tbot
plugins: hypothesis-6.10.1, mock-3.1.1, qt-3.3.0
collected 138 items / 134 deselected / 4 selected
selftest/tests/test_shell.py::test_simple_output[LocalhostBash] PASSED [ 25%]
selftest/tests/test_shell.py::test_simple_output[LocalhostSlowBash] PASSED [ 50%]
selftest/tests/test_shell.py::test_simple_output[LocalhostAsh] FAILED [ 75%]
selftest/tests/test_shell.py::test_simple_output[MocksshClient] PASSED [100%]
=========================================== FAILURES ===========================================
_______________________________ test_simple_output[LocalhostAsh] _______________________________
[...]
> return (int(retcode), out)
E ValueError: invalid literal for int() with base 10: '\x1b[?2004l\r0\n\x1b[?2004h'
It is clearly visible here that the other end disabled bracketed paste mode after entering a command and reenabled it before returing to the prompt. So this smells a lot like GNU readline and indeed the changelog for readline version 8.1 notes that
h. Bracketed paste mode is enabled by default. There is a configure-time option (--enable-bracketed-paste-default) to set the default to on or off.
Now, this leaves me wondering why it even works at all with bash right now, but apparently LocalhostBash
works fine and just LocalhostAsh
(which uses bash --posix
under the hood) does not. I need to take a closer look to find out what's going on here... In the meantime, can you verify that you have GNU readline version 8.1 installed?
from tbot.
Okay, I found a solution that at least solves the problems I could see. Please try again with the latest version from master
(ec0f6c6 ("treewide: Invoke bash with --noediting")) whether the problem is fixed for you as well.
from tbot.
Hi,
thanks for the quick response.
Yes, I can confirm that I have GNU readline 8.1 installed. The changes in ec0f6c6 fix the problem for me as well.
Thanks.
from tbot.
Related Issues (20)
- Possible bug when auto login is used on the device HOT 3
- Compatibility of `machine.linux.Path` with unaware code HOT 10
- Order of requested roles should not matter HOT 2
- Paramiko SSHException: not found in known_hosts HOT 2
- [Help] Run a pipe shell command HOT 3
- How to access role.Board from role.BoardUboot and role.BoardLinux? HOT 4
- Support jump hosts in the SSH connector HOT 2
- At least Python 3.8 is required by tbot/newbot HOT 3
- Unhandled escape sequences clobber tbot output
- When running tests via SSH connector and SSH connection breaks due to device crash TBot hangs waiting indefinitely for SSH HOT 3
- shell.copy() does not accept globs in source path HOT 2
- Base exception classed raised HOT 3
- newbot CLI cannot generate log files
- Continuously print console to stdout
- Early load config when integrating tbot into pytest HOT 6
- Memory leak in SubprocessChannelIO HOT 3
- Processes not being terminated after SSH connection HOT 6
- Display SSH connection errors
- Timeout when waiting for a temination of a subprocess is hardcoded HOT 3
- Weird power cycle recursion HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tbot.