PicGo / PicGo-Core

:zap:A tool for pictures uploading. Both CLI & API supports.
https://picgo.github.io/PicGo-Core-Doc/
MIT License
832 stars 84 forks source link

smms图床上传图片失败 RequestError: Error: connect ETIMEDOUT #154

Closed Marhoosh closed 1 year ago

Marhoosh commented 1 year ago

RequestError: Error: connect ETIMEDOUT. 日志文件如下 2023-06-06 17:10:51 [PicGo INFO] Before transform 2023-06-06 17:10:51 [PicGo INFO] Transforming... 2023-06-06 17:10:51 [PicGo INFO] Before upload 2023-06-06 17:10:51 [PicGo INFO] Uploading... 2023-06-06 17:11:12 [PicGo WARN] failed 2023-06-06 17:11:12 [PicGo ERROR] RequestError: Error: connect ETIMEDOUT 59.24.3.174:443 ------Error Stack Begin------ RequestError: Error: connect ETIMEDOUT 59.24.3.174:443 at new RequestError (C:\Users\Administrator\AppData\Roaming\Typora\picgo\win64\node_modules\request-promise-core\lib\errors.js:14:15) at Request.plumbing.callback (C:\Users\Administrator\AppData\Roaming\Typora\picgo\win64\node_modules\request-promise-core\lib\plumbing.js:87:29) at Request.RP$callback [as _callback] (C:\Users\Administrator\AppData\Roaming\Typora\picgo\win64\node_modules\request-promise-core\lib\plumbing.js:46:31) at self.callback (C:\Users\Administrator\AppData\Roaming\Typora\picgo\win64\node_modules\request\request.js:185:22) at Request.emit (events.js:210:5) at Request.onRequestError (C:\Users\Administrator\AppData\Roaming\Typora\picgo\win64\node_modules\request\request.js:877:8) at ClientRequest.emit (events.js:210:5) at TLSSocket.socketErrorListener (_http_client.js:406:9) at TLSSocket.emit (events.js:210:5) at emitErrorNT (internal/streams/destroy.js:92:8) -------Error Stack End-------

junxian-li-hpc commented 1 year ago

需要安装另一个插件 smms-user

安装

在命令行里通过以下命令安装: picgo install smms-user 或者我看你的出错信息,可以在C:\Users\Administrator\AppData\Roaming\Typora\picgo这个路径打开cmd,然后输入上一行命令。

配置

然后配置使用smms-user: 在 c:\users\你的用户名\.picgo\ 这个路径,打开config.json,把下面的内容复制进去:

{
  "picBed": {
    "current": "smms-user",
    "uploader": "smms-user",
    "transformer": "path",
    "smms-user": {
      "Authorization": "这里写你自己的!!!!!!!!!"
    }
  },
  "picgoPlugins": {
    "picgo-plugin-smms-user": true
  }
}
Marhoosh commented 1 year ago

解决了! 十分感谢!🥰🥰🥰 找到问题出在哪了,之前安装了smms-user这个插件,但配置信息写错了,写的以下这段

{
  "picBed": {
    "uploader": "smms", // 代表当前的默认上传图床为 SM.MS,
    "smms": {
      "token": "" // 从 https://sm.ms/home/apitoken 获取的 token
      // "backupDomain": "smms.app" // v2.3.1 支持备用上传域名,可选。推荐 smms.app
    }
  },
  "picgoPlugins": {
    "picgo-plugin-smms-user": true
  } // 为插件预留
}
Marhoosh commented 1 year ago

@Lei-DaQQ 你好,有个小小的疑问,在提出这个问题之前,我也找了许多办法去解决,在picgo-core文档以及smms-user插件都没找到相应的配置文件,比较好奇你是如何解决的。

Molunerfinn commented 1 year ago

PicGo-Core 插件文档没有及时更新,backupDomain 是 picgo-core 自带的配置,不是 smms-user 的配置。在 PicGo 主仓库有更新

SroUngE commented 8 months ago

需要安装另一个插件 smms-user

安装

在命令行里通过以下命令安装: picgo install smms-user 或者我看你的出错信息,可以在C:\Users\Administrator\AppData\Roaming\Typora\picgo这个路径打开cmd,然后输入上一行命令。

配置

然后配置使用smms-user: 在 c:\users\你的用户名\.picgo\ 这个路径,打开config.json,把下面的内容复制进去:

{
  "picBed": {
    "current": "smms-user",
    "uploader": "smms-user",
    "transformer": "path",
    "smms-user": {
      "Authorization": "这里写你自己的!!!!!!!!!"
    }
  },
  "picgoPlugins": {
    "picgo-plugin-smms-user": true
  }
}

感谢大佬,找了好久,原来是配置更新了