xunlei-lixian
xunlei-lixian copied to clipboard
[BUG]The problem of update
我的缩写配置:
alias lx='python2 ~/xunlei-lixian/lixian_cli.py add -bt'
于今天上传不正常,PULL最新的版本后仍就无法工作,虽然观察提交日志表示以解决上传问题,以下是Python的错误回溯:
Traceback (most recent call last):
File "/home/fx-ti/xunlei-lixian/lixian_cli.py", line 63, in <module>
execute_command()
File "/home/fx-ti/xunlei-lixian/lixian_cli.py", line 60, in execute_command
commands[command](args[1:])
File "/home/fx-ti/xunlei-lixian/lixian_cli_parser.py", line 165, in parse
return f(parser(args_list, *args, **kwargs))
File "/home/fx-ti/xunlei-lixian/lixian_commands/add.py", line 18, in add_task
tasks = lixian_query.find_tasks_to_download(client, args)
File "/home/fx-ti/xunlei-lixian/lixian_query.py", line 392, in find_tasks_to_download
base = build_query(client, args)
File "/home/fx-ti/xunlei-lixian/lixian_query.py", line 384, in build_query
base.register_queries(parse_queries(base, args))
File "/home/fx-ti/xunlei-lixian/lixian_query.py", line 376, in parse_queries
return [to_query(base, arg, bt_processors if args.torrent else processors) for arg in args] or [default_query(args)(base)]
File "/home/fx-ti/xunlei-lixian/lixian_query.py", line 309, in to_query
q = process(base, arg)
File "/home/fx-ti/xunlei-lixian/lixian_queries.py", line 168, in local_bt_processor
return LocalBtQuery(base, x)
File "/home/fx-ti/xunlei-lixian/lixian_queries.py", line 146, in __init__
self.task = self.base.find_task_by_hash(self.hash)
File "/home/fx-ti/xunlei-lixian/lixian_query.py", line 77, in find_task_by_hash
for t in self.get_tasks():
File "/home/fx-ti/xunlei-lixian/lixian_query.py", line 49, in get_tasks
self.tasks = self.fetch_tasks()
File "/home/fx-ti/xunlei-lixian/lixian.py", line 286, in read_all_tasks
tasks, next_link = self.read_task_page(type_id)
File "/home/fx-ti/xunlei-lixian/lixian.py", line 274, in read_task_page
return self.read_task_page_url(url)
File "/home/fx-ti/xunlei-lixian/lixian.py", line 21, in withretry
return f(*args, **kwargs)
File "/home/fx-ti/xunlei-lixian/lixian.py", line 248, in read_task_page_url
tasks = [t for t in parse_json_tasks(data) if not t['expired']]
File "/home/fx-ti/xunlei-lixian/lixian.py", line 668, in parse_json_tasks
return map(convert_task, tasks)
File "/home/fx-ti/xunlei-lixian/lixian.py", line 642, in convert_task
'type': re.match(r'[^:]+', data['url']).group().lower(),
AttributeError: 'NoneType' object has no attribute 'group'
望问题早日解决!
我这没遇到这个错误。你是所有的种子都遇到了这个错误吗?
很不幸,是的 在今天测试的时候依旧如此
你的任务是不是太多了?删掉一些看看。
。。。
今天更新了版本:5d14219
新的Python错误回溯:
Traceback (most recent call last):
File "/home/fx-ti/xunlei-lixian/lixian_cli.py", line 63, in <module>
execute_command()
File "/home/fx-ti/xunlei-lixian/lixian_cli.py", line 60, in execute_command
commands[command](args[1:])
File "/home/fx-ti/xunlei-lixian/lixian_cli_parser.py", line 165, in parse
return f(parser(args_list, *args, **kwargs))
File "/home/fx-ti/xunlei-lixian/lixian_commands/add.py", line 17, in add_task
client = create_client(args)
File "/home/fx-ti/xunlei-lixian/lixian_commands/util.py", line 53, in create_client
return XunleiClient(args.username, args.password, args.cookies)
File "/home/fx-ti/xunlei-lixian/lixian.py", line 69, in __init__
self.login()
File "/home/fx-ti/xunlei-lixian/lixian.py", line 206, in login
raise NotImplementedError('Verification code required')
NotImplementedError: Verification code required
加油!
新版本的问题是 #344 导致的。我merge的时候没做测试。等我rollback下。
再更新下代码试试。 "Verification code required"是之前的一个pull request导致的,我当时也没仔细看,现在已经revert了。 'NoneType' object has no attribute 'group'可能是任务数太多了。迅雷的服务器不稳定,任务数太多刷新经常出错。你可以把没用的任务删掉试试。
OK Thank you! It works well! GOOD GOB!!!
推荐对于NoneType错误进行捕获,转而抛出“任务数可能过多,服务器不稳定,工作出现异常,建议删除部分任务!”的提示。 不清楚Python是否支持相关机制。。