Skip to content

fish issue on termux with psutil #1502

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

Open
EnderNon opened this issue Mar 7, 2025 · 0 comments
Open

fish issue on termux with psutil #1502

EnderNon opened this issue Mar 7, 2025 · 0 comments

Comments

@EnderNon
Copy link

EnderNon commented Mar 7, 2025

Error running eval $(TF_SHELL=fish thefuck --alias) on fish shell in termux. Also have psutil err when running normally. The fix was to run the eval command using TF_SHELL=fish but that doesn't seem to work here. I'm using https://github.com/DL909/thefuck/ because this repo is just dead and has err due to imp.

Running eval alias command has this error

eval $(TF_SHELL=fish thefuck --alias)  21.2s  Fri Mar  7 14:16:28 2025
fish: Expected end of the statement, but found a pipe
function fuck -d "Correct your previous console command"   set -l fucked_up_command $history[1]   env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command   if [ "$unfucked_command" != "" ]     eval $unfucked_command     builtin history delete --exact --case-sensitive -- $fucked_up_command     builtin history merge   end end
                                                                                                                                                                                                                       ^ 

Running regular command has this error

fuck                                    7.6s  Fri Mar  7 14:14:36 2025
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/psutil/_pslinux.py", line 1646, in wrapper
    return fun(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/psutil/_pslinux.py", line 1890, in create_time
    bt = BOOT_TIME or boot_time()
                      ^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/psutil/_pslinux.py", line 1561, in boot_time
    with open_binary(path) as f:
         ^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/psutil/_common.py", line 766, in open_binary
    return open(fname, "rb", buffering=FILE_READ_BUFFER_SIZE)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/proc/stat'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/fuck", line 5, in <module>
    from thefuck.entrypoints.not_configured import main
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/thefuck/entrypoints/not_configured.py", line 14, in <module>
    from ..shells import shell  # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/thefuck/shells/__init__.py", line 52, in <module>
    shell = _get_shell_from_env() or _get_shell_from_proc()
                                     ^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/thefuck/shells/__init__.py", line 45, in _get_shell_from_proc
    proc = proc.parent()
           ^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/psutil/__init__.py", line 596, in parent
    ctime = self.create_time()
            ^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/psutil/__init__.py", line 772, in create_time
    self._create_time = self._proc.create_time()
                        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/psutil/_pslinux.py", line 1648, in wrapper
    raise AccessDenied(pid, name) from err
psutil.AccessDenied: (pid=25206, name='fuck')
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

1 participant