-
Notifications
You must be signed in to change notification settings - Fork 109
tmux cant find sessions when testing in docker #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For a little context, I'm using tmux in my docker image to make it easy to send keys to and occasionally kill a badly-behaving python2 process that I have given up try to treat respectfully. It works wonderfully, but I just tried to unit test it and the tests fail on the first step, as demonstrated above. Not a major issue since the whole thing has been working without tests for a few months now but I though I should bring it to your attention. |
I was also having this issue although I was not running inside docker. In my case the locale was wrong and my I had this: $ echo $LANG
en_GB
$ python3 -c "import libtmux ; print(libtmux.Server().list_sessions())"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/samir/.local/lib/python3.6/site-packages/libtmux/server.py", line 183, in list_sessions
return [Session(server=self, **s) for s in self._sessions]
File "/home/samir/.local/lib/python3.6/site-packages/libtmux/server.py", line 183, in <listcomp>
return [Session(server=self, **s) for s in self._sessions]
File "/home/samir/.local/lib/python3.6/site-packages/libtmux/session.py", line 61, in __init__
raise ValueError('Session requires a `session_id`')
ValueError: Session requires a `session_id` And managed to fix by correctly setting the $ export LANG=en_GB.UTF-8
$ python3 -c "import libtmux ; print(libtmux.Server().list_sessions())"
[Session($0 0), Session($8 8), Session($9 dev)] libtmux uses tab characters ( |
Steps to reproduce:
test_tmux.py
Dockerfile:
then
docker build .
fails withInterestingly, replacing 'ubuntu:18.04' with 'python:3.7-slim' works. I thought this might mean it was an issue with the apt version of pip (which I know is dodgy), but adding a 'pip install --upgrade pip' didn't help.
The text was updated successfully, but these errors were encountered: