登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
登录
注册
代码拉取完成,页面将自动刷新
开源项目
>
开发工具
>
测试工具
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
32
Star
93
Fork
79
anolis
/
tone-cli
代码
Issues
3
Pull Requests
9
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
在中文环境下通过python2.7调用exec_cmd.py安装软件包失败
已确认
#IBKGPZ
缺陷
Huanian Li
创建于
2025-02-06 17:25
### 问题描述 + 内核版本: 4.19.90-2206.2.0.0154.vlx30.v99_2003.x86_64 + OS 版本: LinxOS 6.0.99 EL20.03-SP3 + 平台架构: x86_64 + 相关日志: ```bash Read Private Settings /opt/tone/etc/tonerc Host gitee.com not found in /root/.ssh/known_hosts Host ssh.github.com not found in /root/.ssh/known_hosts libtirpc-devel not installed Traceback (most recent call last): File "/usr/local/bin/tone", line 6, in <module> run() File "/opt/tone/core/tone.py", line 97, in run return worker.obj.run(config) File "/opt/tone/core/modules/cli/run/Subcommand.py", line 57, in run subcommand.run() File "/opt/tone/core/subcommandflow.py", line 24, in run dispatcher.map_method('run', self) File "/opt/tone/core/modulemanager.py", line 77, in map_method method(*argv) File "/opt/tone/core/modules/subcommand/run/Worker.py", line 19, in run testcmd.install() File "/opt/tone/core/utils/tests.py", line 356, in install self._run(command, halted_on_fail=True) File "/opt/tone/core/utils/tests.py", line 258, in _run self.result = executor.run() File "/opt/tone/core/utils/exec_cmd.py", line 168, in run self.save_log_by_type(True) File "/opt/tone/core/utils/exec_cmd.py", line 138, in save_log_by_type data = self.read_output(piptype) File "/opt/tone/core/utils/exec_cmd.py", line 213, in read_output raise BaseException("{}\n{}".format(e, traceback.format_exc())) BaseException: 'ascii' codec can't encode character u'\u5e74' in position 51: ordinal not in range(128) Traceback (most recent call last): File "/opt/tone/core/utils/exec_cmd.py", line 210, in read_output print(data,end='') UnicodeEncodeError: 'ascii' codec can't encode character u'\u5e74' in position 51: ordinal not in range(128) ``` ### 复现方法 #### 1 通过T-One Web创建一个Job 设置的环境变量如下: ```bash TONE_PATH="/opt/tone" LANG="zh_CN.UTF-8" LC_ALL="zh_CN.UTF-8" TONE_CLI_GIT_URL="git@172.23.45.60:linxos-test-platform/anolis/tone-cli.git" GIT_URL="git@172.23.45.60:linxos-test-platform/anolis/ltp.git" LTP_BRANCH="linxos-6.0.99-2003" ``` #### 2 登录到被测机器查看日志 ```bash root@VM161:/tmp# cat /tmp/tone_ltp_math.log ``` #### 3 检查运行Job的Python解释器 ```bash root@VM161:/tmp# /usr/bin/env python Python 2.7.18 (default, Dec 31 2021, 19:58:09) [GCC 7.3.0] on linux2 ...<snip>... ``` 运行Job调用的是`python 2.7.18`。 ### 实际效果 在中文环境下,无法通过`python2.7`执行脚本命令安装`libtirpc-devel`。 ### 期望效果 在中文环境下,通过`python2.7`执行脚本命令安装`libtirpc-devel`,安装成功。
### 问题描述 + 内核版本: 4.19.90-2206.2.0.0154.vlx30.v99_2003.x86_64 + OS 版本: LinxOS 6.0.99 EL20.03-SP3 + 平台架构: x86_64 + 相关日志: ```bash Read Private Settings /opt/tone/etc/tonerc Host gitee.com not found in /root/.ssh/known_hosts Host ssh.github.com not found in /root/.ssh/known_hosts libtirpc-devel not installed Traceback (most recent call last): File "/usr/local/bin/tone", line 6, in <module> run() File "/opt/tone/core/tone.py", line 97, in run return worker.obj.run(config) File "/opt/tone/core/modules/cli/run/Subcommand.py", line 57, in run subcommand.run() File "/opt/tone/core/subcommandflow.py", line 24, in run dispatcher.map_method('run', self) File "/opt/tone/core/modulemanager.py", line 77, in map_method method(*argv) File "/opt/tone/core/modules/subcommand/run/Worker.py", line 19, in run testcmd.install() File "/opt/tone/core/utils/tests.py", line 356, in install self._run(command, halted_on_fail=True) File "/opt/tone/core/utils/tests.py", line 258, in _run self.result = executor.run() File "/opt/tone/core/utils/exec_cmd.py", line 168, in run self.save_log_by_type(True) File "/opt/tone/core/utils/exec_cmd.py", line 138, in save_log_by_type data = self.read_output(piptype) File "/opt/tone/core/utils/exec_cmd.py", line 213, in read_output raise BaseException("{}\n{}".format(e, traceback.format_exc())) BaseException: 'ascii' codec can't encode character u'\u5e74' in position 51: ordinal not in range(128) Traceback (most recent call last): File "/opt/tone/core/utils/exec_cmd.py", line 210, in read_output print(data,end='') UnicodeEncodeError: 'ascii' codec can't encode character u'\u5e74' in position 51: ordinal not in range(128) ``` ### 复现方法 #### 1 通过T-One Web创建一个Job 设置的环境变量如下: ```bash TONE_PATH="/opt/tone" LANG="zh_CN.UTF-8" LC_ALL="zh_CN.UTF-8" TONE_CLI_GIT_URL="git@172.23.45.60:linxos-test-platform/anolis/tone-cli.git" GIT_URL="git@172.23.45.60:linxos-test-platform/anolis/ltp.git" LTP_BRANCH="linxos-6.0.99-2003" ``` #### 2 登录到被测机器查看日志 ```bash root@VM161:/tmp# cat /tmp/tone_ltp_math.log ``` #### 3 检查运行Job的Python解释器 ```bash root@VM161:/tmp# /usr/bin/env python Python 2.7.18 (default, Dec 31 2021, 19:58:09) [GCC 7.3.0] on linux2 ...<snip>... ``` 运行Job调用的是`python 2.7.18`。 ### 实际效果 在中文环境下,无法通过`python2.7`执行脚本命令安装`libtirpc-devel`。 ### 期望效果 在中文环境下,通过`python2.7`执行脚本命令安装`libtirpc-devel`,安装成功。
评论 (
2
)
登录
后才可以发表评论
状态
已确认
误报
上游未修复
待确认
已确认
修复中
已修复
已重复
已验收
已拒绝
负责人
未设置
标签
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (57)
标签 (2)
master
anolis23_6.6_aarch64
tone-cli-cq
an8-5.10_x86_64
jnwang/fix-a-mistake-gitignore-line
anolis23_6.6_x86_64
fix_remote_ssh
unixbench_update
an8-5.10-aarch64
anolis23_5.10-aarch64
fix_mix_match_error_in_ci_test
add_whl_ci_test
mooncake-debug
dev-keentune-run
add_mooncake_test
yyc/fix_kabi_check_for_k6.6
zhangtaibo.ztb
yyc/fix_disktools
adapt_6.6_kernel
fix-iperf-md_file
yyc/fix_intel-lkvs
accelerator-test-223
accelerator
pyt_test
huangxing
lcs/tone-cli-update
intreesimple
ylsong
install_pip
zgy_tone
fix_devlink_port_split.py
v0.1.0_pre
fix_ancert1541
ule3
test_stress-ng
catch_trace
anck_pack_new
test_tone_pts_0112
fix_xfstests_exitcode
fix_tone_pts_test
modify_tone_test
pts-xgj
update_tone_benchmark_test
xgj-anolis-cases
xgj-OpenAnolis-openssl
shanxifanshi/debug_xfstests
update_tone_test
update_tone_iozone
bak221107
detect-tool
bc_container_bind_core
bc-py3-only
sep_benchmark_container
bckata-update
bc-katacontainer
dev
new_ver
0.1.0
1.0
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(1)
1
https://gitee.com/anolis/tone-cli.git
[email protected]
:anolis/tone-cli.git
anolis
tone-cli
tone-cli
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册