y-young / nazurin

🎉 Images collection done right. Telegram 图片收藏机器人 / A Telegram bot that helps you collect ACG illustrations.
http://nazurin.readthedocs.io
MIT License
260 stars 58 forks source link

把mega网盘作为存储仓库时报错 #75

Closed KaidLi closed 1 year ago

KaidLi commented 1 year ago

Describe the bug 把mega网盘作为存储仓库,填入配置文件后报错。文件没有上传至mega网盘中。

To Reproduce Steps to reproduce the behavior:

  1. Mega填写至存储配置值中。
  2. 在给机器人发任何图片网址后报错,回复为Error: (TypeError) string indices must be integers
  3. 经检查,若是同时填写telegramMega两种存储配置,可以正常上传至Telegram频道储存,但是无法上传至Mega网盘。

Expected behavior 希望可以正常上传至mega网盘。

Error output / Logs Logs are usually critical to identify the cause of a bug, please paste the complete log from start to end.

  File "/usr/local/lib/python3.8/dist-packages/mega/mega.py", line 910, in create_folder
    existing_node_id = self.find_path_descriptor(current_path, files)
                       │    │                    │             └ {'SI4TULaK': {'h': 'SI4TULaK', 'p': '', 'u': 'MTwSD0I4Hu4', 't': 2, 'a': {'n': 'Cloud Drive'}, 'ts': 1446988396}, 'SIIBCDyQ':...
                       │    │                    └ 'pic/Twitter'
                       │    └ <function Mega.find_path_descriptor at 0x7f33227eadc0>
                       └ <mega.mega.Mega object at 0x7f3322c05310>

  File "/usr/local/lib/python3.8/dist-packages/mega/mega.py", line 306, in find_path_descriptor
    and file[1]['a']['n'] == foldername):
        │                    └ 'Twitter'
        └ ('uEwQWJ6D', {'h': 'uEwQWJ6D', 'p': 'zQZ3Wa5a', 'u': 'MTwSD0I4Hu4', 't': 1, 'a': 'bgQAKVjtmOgzURH5LR1EwTE057gc4Pw7PzP7-peTHr6...

TypeError: string indices must be integers

Environment (please complete the following information):

Additional context

y-young commented 1 year ago

无法复现,不过我刚才发现了一个别的问题,现在已经修复了,建议拿最新的代码再测试一下 另外可以进入 https://mega.nz/fm/uEwQWJ6D 看看是哪个文件夹,名称有没有特殊字符之类

KaidLi commented 1 year ago

我把 https://mega.nz/fm/uEwQWJ6D 这个文件夹删掉了,问题解决了。

这个文件夹以及里面的文件是这样的

[4665694]lockloc69417855 ├─ [6427194]-01.jpeg ├─ [6427194]-02.jpeg └─ [6427194]-03.jpeg