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] "AttributeError: 'NoneType' object has no attribute 'get'" when trying to get Twitch chats #217

Open
miminashii opened this issue Jul 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@miminashii
Copy link

miminashii commented Jul 1, 2023

Basic information

  • Program version: 0.2.7
  • Python version: 3.11.4
  • Operating system: Windows 11 Home

Describe the bug

"AttributeError: 'NoneType' object has no attribute 'get'" occurs when trying to get Twitch chats.
I tried running the command below several times, and got the same AttributeError at different chats.

Command/Code used

If running from the command line, provide the following:

  1. The command used (including the verbose tag, -v):
python -m chat_downloader "https://www.twitch.tv/videos/1860464348" -v --output "./1860464348.json"
  1. Output from the above command:
2:41:40 | ドスケベ番長: アクセル踏みすぎたな!!
2:41:40 | (3-Month Subscriber, cheer 1) もーやおーらんど: 綺麗に落ちた
2:41:41 | (Prime Gaming) s_rio__ekus: なんだやろなぁ???
2:41:42 | (2-Month Subscriber, cheer 100) haanzooou: tomeruBURNING tomeruBURNING tomeruBURNING tomeruBURNING
[DEBUG] Total number of messages: 5211
[DEBUG] https://gql.twitch.tv:443 "POST /gql HTTP/1.1" 200 214
[DEBUG] Session closed.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\xxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\chat_downloader\__main__.py", line 4, in <module>
    main()
  File "C:\Users\xxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\chat_downloader\cli.py", line 194, in main
    run(**args.__dict__)
  File "C:\Users\xxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\chat_downloader\chat_downloader.py", line 360, in run
    for message in chat:
  File "C:\Users\xxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\chat_downloader\sites\common.py", line 283, in __next__
    item = next(self.chat)
           ^^^^^^^^^^^^^^^
  File "C:\Users\xxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\chat_downloader\sites\twitch.py", line 1172, in _get_chat_messages_by_vod_id
    comments = info.get('comments')
               ^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

If the output is too long, you can attach a text file or remove output which does not constitute to the problem.

@miminashii miminashii added the bug Something isn't working label Jul 1, 2023
@miminashii
Copy link
Author

I just ran that command again and it worked without error. This may have been a temporary problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant