TencentCloud / TencentCloud/tencentcloud-cli
WeData API 读取含中文目录/脚本标题的任务失败,DescribeTaskScript 返回 unmappable characters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 135
- Forks
- 33
- Avg merge
- 8d 8h
- Merged PRs (30d)
- 1
Description
一、问题概述
通过腾讯云 WeData API 查询任务时,任务查询和调度实例查询均正常,但调用 DescribeTaskScript 读取任务脚本失败。
该任务名称本身为纯英文/数字/下划线,不包含中文,但任务所在目录和脚本中文标题包含中文。
二、任务信息
任务名称:jrone_tenant_sys_region
任务 ID:20260610134846807
工作流:jr-one
任务目录:君润one
脚本/数据集成标题:区域工作地表jrone_tenant_sys_region
任务状态:Y(启用)
三、调用方式
使用腾讯云 Python SDK 调用 WeData API DescribeTaskScript。
调用命令:
uv run scripts/wedata_ops.py get_script 20260610134846807
认证配置检查正常,WEDATA_AUTH_ID、WEDATA_AUTH_VALUE、WEDATA_PROJECT_ID、WEDATA_REGION 均已配置。
四、实际结果
query_task 可以正常查询到该任务;
DescribeScheduleInstances 可以正常查询到该任务的调度实例,最近两次实例状态均为 COMPLETED;
但 DescribeTaskScript 读取脚本失败,返回:
code: InvalidParameter
message:
Malformed input or input contains unmappable characters:
/usr/local/taskScheduler_api/temp/20260610134846807/1787297672092区域工作地表jrone_tenant_sys_region_20260610134846714366.dg
RequestId:
24ef299d-61f2-4f59-9148-4959d2ce858d
五、预期结果
即使任务目录名、脚本标题或文件名包含中文,DescribeTaskScript 也应该能够正常返回任务脚本内容,或者对临时文件路径中的中文字符进行正确的 UTF-8 编码处理。
六、影响
当前可以查询任务元数据和调度实例,但无法通过 API 读取该任务的脚本正文,影响脚本审计、备份、排查和自动化运维。
七、希望协助确认
- DescribeTaskScript 是否不支持中文目录名、中文脚本标题或中文临时文件名。
/usr/local/taskScheduler_api/temp/下的临时文件路径是否存在字符编码处理问题。- 是否可以修复服务端路径编码,或提供不依赖中文文件路径的脚本读取接口。
- 是否有临时规避方案,例如任务目录或脚本标题改为纯 ASCII 后重新提交版本。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with scripts/wedata_ops.py and reproduce the issue using uv run scripts/wedata_ops.py get_script 20260610134846807. Compare the failing DescribeTaskScript call with the successful task and schedule-instance queries, then determine whether Chinese directory or script-title characters trigger the unmappable-character error and document a supported result or workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100