简体   繁体   English

詹金斯的pipenv shell返回问题termios.error:(25,'不合适的设备ioctl')

[英]pipenv shell in Jenkins return the issue termios.error: (25, 'Inappropriate ioctl for device')

I have a problem with my Jenkins that when I run a Job, Jenkins follow these steps: 我的Jenkins遇到问题,当我运行Job时,Jenkins遵循以下步骤:

1 - pipenv install -r requirements.txt
2 - pipenv shell 

At this step is showing this error: 此步骤显示此错误:

+ pipenv shell
17:26:04 Loading .env environment variables…
17:26:04 Launching subshell in virtual environment…
17:26:04 Traceback (most recent call last):
17:26:04   File "/usr/local/bin/pipenv", line 11, in <module>
17:26:04     sys.exit(cli())
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py", line 764, in __call__
17:26:04     return self.main(*args, **kwargs)
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py", line 717, in main
17:26:04     rv = self.invoke(ctx)
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py", line 1137, in invoke
17:26:04     return _process_result(sub_ctx.command.invoke(sub_ctx))
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py", line 956, in invoke
17:26:04     return ctx.invoke(self.callback, **ctx.params)
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py", line 555, in invoke
17:26:04     return callback(*args, **kwargs)
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
17:26:04     return ctx.invoke(f, obj, *args, **kwargs)
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py", line 555, in invoke
17:26:04     return callback(*args, **kwargs)
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/cli/command.py", line 390, in shell
17:26:04     pypi_mirror=state.pypi_mirror,
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/core.py", line 2184, in do_shell
17:26:04     shell.fork_compat(*fork_args)
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/shells.py", line 121, in fork_compat
17:26:04     c.interact(escape_character=None)
17:26:04   File "/usr/local/lib/python3.6/dist-packages/pipenv/vendor/pexpect/pty_spawn.py", line 761, in interact
17:26:04     mode = tty.tcgetattr(self.STDIN_FILENO)
17:26:04 termios.error: (25, 'Inappropriate ioctl for device')
17:26:04 Build step 'Execute shell' marked build as failure
17:26:05 Finished: FAILURE

I've searched for this error and everything I found doesn't work for me, for instance: 我搜索过这个错误,我找到的所有内容对我都不起作用,例如:

1- Execute pipenv shell --fancy

2 - If I get in Jenkins machine and run pipenv shell it goes through 2 - 如果我进入Jenkins机器并运行pipenv shell,它就会通过

root@ip:~/.jenkins/workspace/Midhaz-Back-New-MR# pipenv shell
+ pipenv shell
Loading .env environment variables…
Launching subshell in virtual environment…
root@ip:~/.jenkins/workspace/Midhaz-Back-New-MR#  . /root/.local/share/virtualenvs/Midhaz-Back-New-MR-TllOp5eO/bin/activate
(Midhaz-Back-New-MR) root@ip:~/.jenkins/workspace/Midhaz-Back-New-MR# 

Jenkins is a non-interactive environment. 詹金斯是一个非互动的环境。 All user input is nullified, and it's just an output console. 所有用户输入都无效,它只是一个输出控制台。

So you cannot run an interactive shell from it without redirection of the standard input. 因此,如果不重定向标准输入,则无法从中运行交互式shell。

You probably want something non-interactive but still in your virtual environment like: 您可能想要一些非交互式的东西,但仍然在您的虚拟环境中,例如:

pipenv run python my_script.py my_argument_1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 键盘和弦代码的错误消息:termios.error: (25, 'Inappropriate ioctl for device') - Error message for keyboard-chord code: termios.error: (25, 'Inappropriate ioctl for device') IOError:[Errno 25] 设备的 ioctl 不合适 - IOError: [Errno 25] Inappropriate ioctl for device X 服务器“localhost:10.0”上的 matplot lib“致命 IO 错误 25(设备的 ioctl 不合适)” - matplot lib "fatal IO error 25 (Inappropriate ioctl for device) on X server "localhost:10.0" 崇高的tset:标准错误:设备的ioctl不适当 - Sublime tset: standard error: Inappropriate ioctl for device OpenCV3错误:“无法停止流:设备的不适当的ioctl” - OpenCV3 error: “Unable to stop the stream: Inappropriate ioctl for device” 如何抑制“stty:'标准输入':设备的 ioctl 不合适”错误 - How to supress the “stty: 'standard input': Inappropriate ioctl for device” error Pexpect和PyCharm - 适用于设备的ioctl - Pexpect and PyCharm - Inappropriate ioctl for device opencv无法阻止流:设备的ioctl不合适 - opencv Unable to stop the stream: Inappropriate ioctl for device 在Python中运行ioctl会返回ENOTTY-设备不适合的ioctl - Running ioctl in Python returns ENOTTY - inappropriate ioctl for device 无法在 Pyserial 中打开串行连接:“termios.error: (22, &#39;Invalid argument&#39;)” - Can't open serial connection in Pyserial: "termios.error: (22, 'Invalid argument') "
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM