Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]TypeError: object of type 'NoneType' has no len() #751

Open
4 tasks done
6986552 opened this issue Jul 30, 2024 · 3 comments
Open
4 tasks done

[BUG]TypeError: object of type 'NoneType' has no len() #751

6986552 opened this issue Jul 30, 2024 · 3 comments
Labels
故障(bug) 代码问题导致的错误(Bugs caused by code problems)

Comments

@6986552
Copy link

6986552 commented Jul 30, 2024

  • 我查看了 文档 以及 已关闭的问题 以寻找可能的解决方案。

  • 我在 常见的问题与解决办法 中找不到我的问题。

  • 你的问题是公开的,请注意删除个人敏感内容再上传

  • 不按照模板填写的问题将不会得到优先的处理。

  • 如果错误问题是可视化的,请在屏幕截图贴截图。如果你是开发者请在错误重现提供一个最小的代码示例来演示该问题。

  • 相同的问题将会被标记重复(duplicate),如果你的问题被标记为已确认(confirmed)则会在后续的推送中修复,请时刻留意。

  • 退订邮件提醒请点击邮件的底部unsubscribe

详细描述错误
INFO App: douyin
INFO 主配置路径:D:\Program Files\Python311\Lib\site-packages\f2\conf\app.yaml
INFO 自定义配置路径:D:\PycharmProjects\config\app.yaml
INFO Version 0.0.1.5
INFO 开始爬取用户:MS4wLjA…………DMtHQs 发布的作品
INFO 开始爬取第 0 页

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "D:\Program Files\Python311\Scripts\f2.exe_main
.py", line 7, in
File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\f2\apps\douyin\cli.py", line 443, in douyin
ctx.invoke(set_cli_config, **kwargs)
File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\f2\cli\cli_commands.py", line 135, in set_cli_config
asyncio.run(run_app(kwargs))
File "D:\Program Files\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\f2\cli\cli_commands.py", line 144, in run_app
await app_module.main(kwargs)
File "D:\Program Files\Python311\Lib\site-packages\f2\apps\douyin\handler.py", line 1484, in main
await mode_function_mapmode
File "D:\Program Files\Python311\Lib\site-packages\f2\apps\douyin\handler.py", line 264, in handle_user_post
self.kwargs, aweme_data_list._to_list(), user_path
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\f2\apps\douyin\filter.py", line 345, in _to_list
attr_values = getattr(self, key)
^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python311\Lib\site-packages\f2\apps\douyin\filter.py", line 243, in video_bit_rate
return [
^
File "D:\Program Files\Python311\Lib\site-packages\f2\apps\douyin\filter.py", line 249, in
if len(aweme) == 1
^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

系统平台

单击展开 Q:你在哪个平台(Win/Linux/Mac)上运行?你使用的是什么浏览器?你使用的是什么终端软件?你使用的F2是什么版本?

A:

  • 操作系统: [e.g. Win10 x64 22H2 19045.4046]
  • 浏览器 [e.g. Edge 122.0.2365.52]
  • 终端 [e.g. WT 1.18.10301.0]
  • F2版本 [e.g. 0.0.1.5]

错误重现

单击展开 Q: 请你复制并粘贴出错时运行的命令和配置文件内容,以及重现该行为的步骤。如果你一次性就提供完整信息,就会节省很多解决问题的时间。

A:

Q: 请添加调试命令f2 -d DEBUG重新运行出错的命令并提供日志目录下的日志文件。

A:

Q: 如果是开发者请提供最小的代码示例

A:

预期行为
简明扼要地描述期望发生的事情。

屏幕截图
111
222

日志文件
请添加调试日志文件以帮助解释你的问题。

其他
如有,可以添加有关问题的其他信息。

@6986552 6986552 added the 故障(bug) 代码问题导致的错误(Bugs caused by code problems) label Jul 30, 2024
@6986552
Copy link
Author

6986552 commented Jul 30, 2024

333
gegnxinl更新了0.0.16之后,,每次错误不太一样。有时不报错,只有“没有找到合适作品”的提示。

@He40026
Copy link

He40026 commented Oct 7, 2024

遇到了一样的问题,求解决

@zsmlgy
Copy link

zsmlgy commented Nov 2, 2024

解决了吗兄弟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
故障(bug) 代码问题导致的错误(Bugs caused by code problems)
Projects
None yet
Development

No branches or pull requests

3 participants