#997 ({'code': 'SignatureDoesNotMatch', 'message': 'code: 400, Specified signature is not matched with our calculation. serve

111.34* Posted at: 7 days ago 👁19

({'code': 'SignatureDoesNotMatch', 'message': 'code: 400, Specified signature is not matched with our calculation. server string to sign is:POST&%2F&AccessKeyId%3DLTAI5tC9KVwaTerreWNaHBZh%26Action%3DTranslate%26Format%3Djson%26FormatType%3Dtext%26Scene%3Dgeneral%26SignatureMethod%3DHMAC-SHA1%26SignatureNonce%3D41de5509d7abf071af9ec751540ee83a%26SignatureVersion%3D1.0%26SourceLanguage%3Dauto%26SourceText%3D%25E4%25BD%25A0%25E5%25A5%25BD%25E5%2595%258A%25E6%2588%2591%25E7%259A%2584%25E6%259C%258B%25E5%258F%258B%26TargetLanguage%3Den%26Timestamp%3D2025-10-15T10%253A24%253A50Z%26Version%3D2018-10-12 request id: 58ABF3DD-341A-5621-BDC1-A38919914E7B', 'data': {'RequestId': '58ABF3DD-341A-5621-BDC1-A38919914E7B', 'Message': 'Specified signature is not matched with our calculation. server string to sign is:POST&%2F&AccessKeyId%3DLTAI5tC9KVwaTerreWNaHBZh%26Action%3DTranslate%26Format%3Djson%26FormatType%3Dtext%26Scene%3Dgeneral%26SignatureMethod%3DHMAC-SHA1%26SignatureNonce%3D41de5509d7abf071af9ec751540ee83a%26SignatureVersion%3D1.0%26SourceLanguage%3Dauto%26SourceText%3D%25E4%25BD%25A0%25E5%25A5%25BD%25E5%2595%258A%25E6%2588%2591%25E7%259A%2584%25E6%259C%258B%25E5%258F%258B%26TargetLanguage%3Den%26Timestamp%3D2025-10-15T10%253A24%253A50Z%26Version%3D2018-10-12', 'Recommend': 'https://api.aliyun.com/troubleshoot?q=SignatureDoesNotMatch&product=alimt&requestId=58ABF3DD-341A-5621-BDC1-A38919914E7B', 'HostId': 'mt.cn-hangzhou.aliyuncs.com', 'Code': 'SignatureDoesNotMatch', 'statusCode': 400}, 'description': 'None', 'accessDeniedDetail': None},):Ali

Windows-10-10.0.19045-SP0
version:v3.78
frozen:True
language:zh

1 Replies

本条内容由 gpt-5-mini 回复

问题很可能是阿里云翻译请求签名计算不一致导致(常见原因:AccessKeyId/Secret 错误或多余空格、系统时间不同步、请求参数被重复/错误编码、或旧版软件存在签名实现 bug)。请按下面步骤逐项排查并尝试解决:

  1. 核心检查 — 凭证与空格

    1. 在 软件菜单 -> 翻译设置 中,重新手动粘贴 AccessKeyId 与 AccessKeySecret,确保前后无空格或换行后保存并重启软件(配置文件位于 videotrans/params.json)。
    2. 不要在任何地方额外添加引号或其它字符。
  2. 系统时间与时区

    1. 同步系统时间到网络时间(Windows 时间同步),确认时区和时间准确(签名中 Timestamp 偏差过大会导致失败)。
  3. 编码 / 代理 / 中间件影响

    1. 若使用 HTTP 代理、企业网络或抓包工具(会修改请求),请临时关闭或直接连接网络重试,排除代理修改了 URL/参数编码的可能性。
    2. 如果你对 requests/SDK 做过二次封装或使用自建代码调用阿里 API,检查是否对参数做了重复 URL encode(阿里签名对编码有严格要求)。
  4. Endpoint/Region 与 host

    1. 确认翻译通道选择的是阿里云(并且没有误选错误 region/endpoint)。错误的 host/路径也会导致签名不匹配(你的错误里 HostId 显示 mt.cn-hangzhou.aliyuncs.com,确认和软件设置一致)。
  5. 版本相关问题

    1. 你当前为 v3.78,建议升级到 Windows 预打包最新版 v3.81(已知若干对 API 调用和签名相关的修复在新版中可能已解决)。
    2. 升级后再次重试相同操作。
  6. 临时替代验证

    1. 尝试切换到另一个翻译渠道(如 Google / Microsoft)以确认问题仅发生在阿里云一处,便于定位是凭证/网络还是软件实现问题。
  7. 收集诊断信息(如上步骤无效请提供)

    1. 将位于 软件根目录/logs/ 下的最新日志文件(格式 {年月日}.log)贴出(或上传),以便进一步分析(注意:不要直接在公开处泄露 AccessKeySecret;可提供日志摘录及错误完整报文,但将 Secret 字段打码)。
    2. 如果可行,提供“菜单 -> 翻译设置”页面截图(请遮盖 Secret),并把出错时的完整 RequestId(你的例子中是 58ABF3DD-341A-5621-BDC1-A38919914E7B)和错误完整文本一并贴上。
    3. 你也可以直接尝试阿里给出的故障排除链接:https://api.aliyun.com/troubleshoot?q=SignatureDoesNotMatch&product=alimt&requestId=58ABF3DD-341A-5621-BDC1-A38919914E7B

如果完成以上排查后仍未解决,请把 videotrans/logs 下的最新日志(出错时间附近的完整日志段)粘贴上来,我会基于日志做进一步诊断。

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions