PeterDing / AliPCS-Py

Aliyundrive API & App 阿里云盘 API 和 客户端

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

调用save保存文件的时候偶尔会有这个报错,也有保存成功的偶尔报错,但报错概率有点高

acoooder opened this issue · comments

命令格式: AliPCS-Py -u $account save --file-id $fileid $shareid "$destdir"

debug信息:

(v0.5.1) ERROR: AliPCSError: error_code: ParamFlowException, response: {'code': 'ParamFlowException', 'message': '9018034bec07433ab4c044ae06777f51',
'requestId': '0a0070ab16772838952492859e16b3', 'resultCode': 'ParamFlowException'}
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/app/app.py:114 in wrap │
│ │
│ 111 │ @wraps(func) │
│ 112 │ def wrap(*args, **kwargs): │
│ 113 │ │ try: │
│ ❱ 114 │ │ │ return func(*args, **kwargs) │
│ 115 │ │ except AliPCSError as err: │
│ 116 │ │ │ _exit_progress_bar() │
│ 117 │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/app/app.py:194 in wrap │
│ │
│ 191 │ │ │ │ f"user_id: [b]{user_id}[/b]" │
│ 192 │ │ │ ) │
│ 193 │ │ │ _change_account(ctx, user_id) │
│ ❱ 194 │ │ │ func(*args, **kwargs) │
│ 195 │ │ │ print() │
│ 196 │ │
│ 197 │ return wrap │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/app/app.py:1391 in save │
│ │
│ 1388 │ else: │
│ 1389 │ │ share_id = share_url_or_id │
│ 1390 │ │
│ ❱ 1391 │ _share.save_shared( │
│ 1392 │ │ api, │
│ 1393 │ │ remotedir, │
│ 1394 │ │ share_id=share_id, │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/commands/share.py:163 in save_shared │
│ │
│ 160 │ if share_url: │
│ 161 │ │ save_shared_by_url(api, remotedir, share_url, password=password) │
│ 162 │ else: │
│ ❱ 163 │ │ save_shared_by_file_ids(api, remotedir, share_id, file_ids, password=password) │
│ 164 │
│ 165 │
│ 166 def list_shared_files( │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/commands/share.py:118 in │
│ save_shared_by_file_ids │
│ │
│ 115 │ │ │ dest_pcs_files[rd] = api.makedir_path(rd) │
│ 116 │ │ dest_pcs_file = dest_pcs_files[rd] │
│ 117 │ │ │
│ ❱ 118 │ │ if not shared_file.is_root() and not remotepath_exists( │
│ 119 │ │ │ api, shared_file.name, rd │
│ 120 │ │ ): │
│ 121 │ │ │ api.transfer_shared_files( │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/commands/share.py:236 in │
│ remotepath_exists │
│ │
│ 233 ) -> bool: │
│ 234 │ names = _cache.get(rd) │
│ 235 │ if not names: │
│ ❱ 236 │ │ names = set([sp.name for sp in api.list_path_iter(rd)]) │
│ 237 │ │ _cache[rd] = names │
│ 238 │ return name in names │
│ 239 │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/commands/share.py:236 in │
│ │
│ 233 ) -> bool: │
│ 234 │ names = _cache.get(rd) │
│ 235 │ if not names: │
│ ❱ 236 │ │ names = set([sp.name for sp in api.list_path_iter(rd)]) │
│ 237 │ │ _cache[rd] = names │
│ 238 │ return name in names │
│ 239 │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/alipcs/api.py:296 in list_path_iter │
│ │
│ 293 │ │ │
│ 294 │ │ dirname = posix_path_dirname(remotepath) │
│ 295 │ │ │
│ ❱ 296 │ │ for p in self.list_iter( │
│ 297 │ │ │ file_id, │
│ 298 │ │ │ share_id=share_id, │
│ 299 │ │ │ desc=desc, │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/alipcs/api.py:216 in list_iter │
│ │
│ 213 │ │ pcs_file = self.meta(file_id, share_id=share_id)[0] │
│ 214 │ │ dirname = pcs_file.name │
│ 215 │ │ while True: │
│ ❱ 216 │ │ │ pcs_files, next_marker = self.list( │
│ 217 │ │ │ │ file_id, │
│ 218 │ │ │ │ share_id=share_id, │
│ 219 │ │ │ │ desc=desc, │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/alipcs/api.py:178 in list │
│ │
│ 175 │ │ more, using the returned next_marker parameter for next list call. │
│ 176 │ │ """ │
│ 177 │ │ │
│ ❱ 178 │ │ info = self._alipcs.list( │
│ 179 │ │ │ file_id=file_id, │
│ 180 │ │ │ share_id=share_id, │
│ 181 │ │ │ desc=desc, │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/alipcs/errors.py:27 in check │
│ │
│ 24 │ │ │
│ 25 │ │ if error_code: │
│ 26 │ │ │ err = parse_error(error_code, str(info)) │
│ ❱ 27 │ │ │ raise err │
│ 28 │ │ │
│ 29 │ │ return info │
│ 30 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AliPCSError: error_code: ParamFlowException, response: {'code': 'ParamFlowException', 'message': '9018034bec07433ab4c044ae06777f51', 'requestId':
'0a0070ab16772838952492859e16b3', 'resultCode': 'ParamFlowException'}

ParamFlowException 应该是服务器上 Sentinel 的 参数限流异常,表示你的频繁调用了某一接口,服务器会对你限流了。

ParamFlowException 应该是服务器上 Sentinel 的 参数限流异常,表示你的频繁调用了某一接口,服务器会对你限流了。

好的,谢谢

ParamFlowException 应该是服务器上 Sentinel 的 参数限流异常,表示你的频繁调用了某一接口,服务器会对你限流了。

你好,这个有没有好的规避办法?发现调到3分钟一次还是报这个错,或者阿里有没有具体的限流标准,比如那个接口多少时间内限制多少次这样的说明?谢谢

目前不知道。