Skip to content
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

xonsh appimage stop after first command #8

Closed
anki-code opened this issue Apr 19, 2020 · 4 comments
Closed

xonsh appimage stop after first command #8

anki-code opened this issue Apr 19, 2020 · 4 comments

Comments

@anki-code
Copy link
Contributor

anki-code commented Apr 19, 2020

Hi! Thank you for the python-appimage! It's straight forward!

I tested xonsh appimage inside xxh and it worked. Now I try to run xonsh appimage as is and I've got unexpected behavior. I tried linuxdeploy-plugin-python xonsh appimage version and got the same.

  1. xonsh stops after any command and freeze process:
bash
mkdir -p /tmp/test && cd /tmp/test
git clone https://github.com/niess/python-appimage && cd python-appimage
python -m python_appimage build app applications/xonsh
./xonsh-x86_64.AppImage
xonsh> echo 123
[1]+  Stopped                 ./xonsh-x86_64.AppImage

Failback to /bin/sh
Traceback (most recent call last):
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/xonsh/__amalgam__.py", line 24189, in main
    return main_xonsh(args)
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/xonsh/__amalgam__.py", line 24218, in main_xonsh
    shell.shell.cmdloop()
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/xonsh/ptk2/shell.py", line 197, in cmdloop
    line = self.singleline(auto_suggest=auto_suggest)
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/xonsh/ptk2/shell.py", line 166, in singleline
    line = self.prompter.prompt(**prompt_args)

  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/prompt_toolkit/shortcuts/prompt.py", line 994, in prompt
    return self.app.run(set_exception_handler=set_exception_handler)
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 811, in run
    return loop.run_until_complete(
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 778, in run_async
    return await _run_async2()
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 760, in _run_async2
    result = await _run_async()
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 682, in _run_async
    with self.input.raw_mode():
  File "/tmp/.mount_xonsh-DFQ6bT/usr/python/lib/python3.8/site-packages/prompt_toolkit/input/vt100.py", line 259, in __enter__
    termios.tcsetattr(self.fileno, termios.TCSANOW, newattr)
termios.error: (5, 'Input/output error')

  1. And the process not really closed:
$ ps -ax | grep xonsh
  862 pts/0    T      0:00 /bin/bash /tmp/.mount_xonsh-10lrWf/AppRun
  866 ?        Ssl    0:00 ./xonsh-x86_64.AppImage
  869 pts/0    T      0:00 /bin/bash /tmp/.mount_xonsh-10lrWf/usr/bin/python3.8 -u -c from xonsh.main import main; main()
  882 pts/0    S      0:00 /home/ubuntu/python-appimage/xonsh-x86_64.AppImage -u -c from xonsh.main import main; main()
  1. And when I try to type any commands in the bash terminal where I run ./xonsh-x86_64.AppImage I've got endless errors:
Traceback (most recent call last):
  File "/tmp/.mount_xonsh-10lrWf/opt/python3.8/lib/python3.8/site-packages/xonsh/__amalgam__.py", line 24206, in func_sig_ttin_ttou
    def func_sig_ttin_ttou(n, f):
BlockingIOError: [Errno 11] Resource temporarily unavailable
Exception ignored when trying to write to the signal wakeup fd:
  1. After kill xonsh process the bash returns to ordinary work.

If you can help it will be great. Thanks!

@anki-code
Copy link
Contributor Author

It looks like xonsh regress. Sorry.

@niess
Copy link
Owner

niess commented Apr 19, 2020

@anki-code I had similar issues at some point. I don't where this comes from. Right now its working for me. Is it related to Xonsh itself?

@anki-code
Copy link
Contributor Author

anki-code commented Apr 19, 2020

I think it's xonsh regress. I described the details in xonsh/xonsh#3525

The workaround is to set xonsh==0.9.13 in requirements.txt.

@anki-code
Copy link
Contributor Author

anki-code commented Apr 19, 2020

When I run xonsh.AppImage in bash I have this issue. When I run it from xonsh it works. I think the problem in how xonsh read and set environment when run from AppImage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants