向Pixellena Lux API请求时发出UnhandledPromiseRejectionWarning警告

Nurhak金

我在尝试使用Pixellena Lux API将jpeg图像转换为webp时遇到以下错误。

(node:13962) UnhandledPromiseRejectionWarning: #<RequestIssueException>
(Use `node --trace-warnings ...` to show where the warning was created)
(node:13962) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:13962) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

API文档。

https://pixellena.com/docs/sdk/

我刚刚将以下部分更新为

let adjustments = {
    "shifter": {
        "steps": [
            {
                "scale-to": {
                    "width": 10
                }
            }
        ]
    },
    "encoder": {
        "quality-measure": "fsim-c",
        "qual-threshold": 2.0
    }
}

卡洛斯·QBA

出现此错误的原因是“ qual-threshold”的值必须在0.25到1.0之间。

您可以https://demo.pixellena.com/adjustmentshttps://pixellena.com/docs/lux-api/上找到有关质量阈值的一些文档

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

向GCP Video Intelligence API发出请求时,权限被拒绝

向 django API 发出 POST 请求时出错

ECONNRREFUSED 使用 Nodejs 向 API 发出获取请求时出错

尝试向pypi api发出请求时出现403错误

向测验 api 发出提取请求时出错

向Google gmail API发出令牌请求时,请求400错误

向 cURL 发出请求时出错

如何连续向API发出GET请求?

使用python向RESTful API发出请求

Ajax向API发出多个请求

如何优化向API发出请求的for循环?

如何向zomato api发出cURL请求?

我如何向API发出请求

如何从getStaticProps向API路由发出请求

向 API 发出请求并解析响应

向Google Contacts REST API发出HTTP GET请求时如何使用API密钥

使用python向Stackoverflow API发出请求时,如何通过标头传递我的API密钥

当我向 api 服务器发出 post 请求时收到 404 错误

在Express.js上使用Axios向Spotify API发出POST请求时出现错误400

向Azure Blob存储[REST API]发出GET请求时授权失败

向Rails API发出POST请求时如何格式化日期字段

使用Flurl向StackExchange API发出GET请求时出现“意外字符异常”

向Twitter API发出HTTP请求时未定义的方法“ OAuth”

向 api.ai 发出大量 GET 请求时,必需的“lang”参数为空

使用HelloJS向Tumblr API发出OAuth 1.0a签名请求时遇到问题

Pixellena Light API不返回优化图像

Python-如何使用请求向API发出PATCH请求

向Flask Restful应用发出请求时出现问题

向logstash发出发布请求时发生CORS错误