jishaku
jishaku copied to clipboard
jsk sh pip is not working
Summary
jsk sh pip is not working
Reproduction steps
jsk sh pip --version jsk sh pip3 --version
If you execute either of the above two codes, [status] Return code -9
will be displayed.
And I'm not good at English, so I use Google Translate. I'm sorry if the text is strange.
Expected results
$ pip --version
pip 21.2.4 from /home/****/.local/lib/python3.8/site-packages/pip (python 3.8)
Actual results
$ pip --version
[status] Return code -9
Checklist
- [x] I have updated discord.py and jishaku to the latest available versions and have confirmed that this issue is still present
- [x] I have searched the open issues for duplicates
- [x] I have shown the entire traceback, if possible
- [x] I have removed my token from display, if visible
System information
discord.py,pip and jishaku version.
- discord.py v1.7.3
- pip v21.2.4
- jishaku v2.2.0
Result of python3 -m discord -v
- Python v3.8.10-final
- discord.py v1.7.3-final
- aiohttp v3.7.3
- system info: Linux 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021
Result of pip show jishaku
Name: jishaku
Version: 2.2.0
Summary: A discord.py extension including useful tools for bot development and debugging.
Home-page: https://github.com/Gorialis/jishaku
Author: Devon (Gorialis) R
Author-email: None
License: MIT
Location: /usr/local/lib/python3.8/dist-packages
Requires: click, discord.py, braceexpand, import-expression
Required-by:
Additional Information
Operation image
pip は終了ステータスのドキュがあんまりないから、これは本当にpipの所為かシェル自体が出しているかは不明です。 jsk sh で他のコマンドが使用できるなら、これは多分環境による問題になると思う (間違ったpipを実行している・pipはpythonかsite-packagesが見つからない・などなど)
whereis pip
, which pip
とpip以外のコマンドをjsk sh
で試してみてください。jsk sh
が全く動かない場合はbash
をインストールするかシェルのコンフィグで解決されるはずですが、pipだけならより深い調査が必要かもしれません
返答遅くなりました。
どのコマンドを実行してもこのように不明なステータスコードが返却されます。 別のインスタンスで実行しても同じように不明なステータスコードのみ返却されました。
気づいていなかったのですが、jsk sh
を実行したときにエラーが発生していました。
Task exception was never retrieved
future: <Task finished name='Task-287' coro=<ShellReader.executor_wrapper() done, defined at /home/user/.local/lib/python3.9/site-packages/jishaku/shell.py:86> exception=error('cannot switch to a different thread')>
Traceback (most recent call last):
File "/home/user/.local/lib/python3.9/site-packages/jishaku/shell.py", line 91, in executor_wrapper
return await self.loop.run_in_executor(None, *args, **kwargs)
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/user/.local/lib/python3.9/site-packages/jishaku/shell.py", line 31, in background_reader
for line in iter(stream.readline, b''):
File "/home/user/.local/lib/python3.9/site-packages/gevent/_fileobjectposix.py", line 178, in readinto
data = self.__read(len(b))
File "/home/user/.local/lib/python3.9/site-packages/gevent/_fileobjectposix.py", line 160, in __read
wait_on_watcher(self._read_watcher, None, None, self.hub)
File "src/gevent/_hub_primitives.py", line 326, in gevent._gevent_c_hub_primitives.wait_on_watcher
File "src/gevent/_hub_primitives.py", line 350, in gevent._gevent_c_hub_primitives.wait_on_watcher
File "src/gevent/_hub_primitives.py", line 304, in gevent._gevent_c_hub_primitives._primitive_wait
File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
File "src/gevent/_hub_primitives.py", line 55, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
File "src/gevent/_waiter.py", line 154, in gevent._gevent_c_waiter.Waiter.get
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
greenlet.error: cannot switch to a different thread
似たような事例で、同じかはわからないのですが、
$ jsk git pull origin master
を実行すると
File "/usr/local/lib/python3.8/site-packages/jishaku/features/shell.py", line 46, in jsk_shell
interface = PaginatorInterface(ctx.bot, paginator, owner=ctx.author)
File "/usr/local/lib/python3.8/site-packages/jishaku/shim/paginator_200.py", line 73, in __init__
self.timeout = kwargs.pop('timeout', 7200)
File "/usr/local/lib/python3.8/site-packages/discord/ui/view.py", line 247, in timeout
if self.__timeout_task is not None:
AttributeError: 'PaginatorInterface' object has no attribute '_View__timeout_task'
このエラーが返ってきてしまって使えません。shコマンドも同じく使えません。 環境は
# 使用ライブラリ
discord.py v2.0.0a Jishaku Githubから下ろしている
# OS
Ubuntu 20.04
になってます