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

DROP_ID in [tag["id"] for tag in self.tags] and self.game != {} TypeError: 'NoneType' object is not iterable #343

Closed
urkoperez16 opened this issue Aug 21, 2023 · 12 comments
Assignees
Labels
🐜 bug Something isn't working ☑ kinda-fixed

Comments

@urkoperez16
Copy link

Describe the bug

This is the errors that I get:

Traceback (most recent call last):

File "/home/urko/TWITCH/3/example.py", line 106, in
twitch_miner.mine(
File "/home/urko/TWITCH/3/TwitchChannelPointsMiner/TwitchChannelPointsMiner.py", line 210, in mine
self.run(streamers=streamers, blacklist=blacklist, followers=followers)
File "/home/urko/TWITCH/3/TwitchChannelPointsMiner/TwitchChannelPointsMiner.py", line 299, in run
self.twitch.check_streamer_online(streamer)
File "/home/urko/TWITCH/3/TwitchChannelPointsMiner/classes/Twitch.py", line 179, in check_streamer_online
self.update_stream(streamer)
File "/home/urko/TWITCH/3/TwitchChannelPointsMiner/classes/Twitch.py", line 98, in update_stream
streamer.stream.update(
File "/home/urko/TWITCH/3/TwitchChannelPointsMiner/classes/entities/Stream.py", line 61, in update
DROP_ID in [tag["id"] for tag in self.tags] and self.game != {}
TypeError: 'NoneType' object is not iterable

Steps to reproduce

Ejecutate in terminal
Wait to loading data
Error

Expected behavior

?

Operating system

Latest

Python version

Latest

Miner version

Latest

Other relevant software versions

No response

Logs

Additional context

No response

@LifeisHardCore
Copy link

same

@ViktorVoloshko
Copy link

Same. I think Twitch pushed some kind of update that broke everything.

@chrswt
Copy link

chrswt commented Aug 21, 2023

+1

@Le0Developer
Copy link

Le0Developer commented Aug 21, 2023

Temporary fix, add or [] at the end of this line:

This will fix the crash, but drops might not work.

Diff:

diff --git a/TwitchChannelPointsMiner/classes/entities/Stream.py b/TwitchChannelPointsMiner/classes/entities/Stream.py
index 99b378f..a36a172 100644
--- a/TwitchChannelPointsMiner/classes/entities/Stream.py
+++ b/TwitchChannelPointsMiner/classes/entities/Stream.py
@@ -54,7 +54,7 @@ class Stream(object):
         self.broadcast_id = broadcast_id
         self.title = title.strip()
         self.game = game
-        self.tags = tags
+        self.tags = tags or []
         self.viewers_count = viewers_count

         self.drops_tags = (

@ViktorVoloshko
Copy link

Temporary fix, add or [] at the end of this line:

This will fix the crash, but drops might not work.

Thx, works just fine. Btw, how does this affect functionality?

@RedD3ATH
Copy link

RedD3ATH commented Aug 21, 2023 via email

@Le0Developer
Copy link

Btw, how does this affect functionality?

Looks like the tags attribute is only used for farming drops, so that should be the only thing affected.
Channel point farming works for me, which is what I care about.

This is a temporary fix for a reason, apply the official fix once it's out.

@sayrex2009
Copy link

guys off topic, how to make it run in windows with different accounts, but with the same rules

rdavydov added a commit that referenced this issue Aug 21, 2023
@rdavydov rdavydov self-assigned this Aug 21, 2023
@rdavydov rdavydov added the 🐜 bug Something isn't working label Aug 21, 2023
@rdavydov rdavydov pinned this issue Aug 21, 2023
@rdavydov rdavydov changed the title Something is wrong DROP_ID in [tag["id"] for tag in self.tags] and self.game != {} TypeError: 'NoneType' object is not iterable Aug 21, 2023
@ViktorVoloshko
Copy link

guys off topic, how to make it run in windows with different accounts, but with the same rules

Create a discussion if you want answer.

@Loran0
Copy link

Loran0 commented Aug 22, 2023

changing self.tags = tags
to self.tags = tags or []

This fix works for me. Also it helps to CLAIM rewards. Before this changes mining was successful, But claiming didn't work.
Now everything works fine.

@rdavydov
Copy link
Owner

rdavydov commented Aug 22, 2023

changing self.tags = tags to self.tags = tags or []

This fix works for me. Also it helps to CLAIM rewards. Before this changes mining was successful, But claiming didn't work. Now everything works fine.

It is already in in the miner repo and in the version 1.8.6. No need to change anything anymore.

@urkoperez16
Copy link
Author

Temporary fix, add or [] at the end of this line:

This will fix the crash, but drops might not work.

Diff:

diff --git a/TwitchChannelPointsMiner/classes/entities/Stream.py b/TwitchChannelPointsMiner/classes/entities/Stream.py
index 99b378f..a36a172 100644
--- a/TwitchChannelPointsMiner/classes/entities/Stream.py
+++ b/TwitchChannelPointsMiner/classes/entities/Stream.py
@@ -54,7 +54,7 @@ class Stream(object):
         self.broadcast_id = broadcast_id
         self.title = title.strip()
         self.game = game
-        self.tags = tags
+        self.tags = tags or []
         self.viewers_count = viewers_count

         self.drops_tags = (

you are a heroe

lyw1217 pushed a commit to lyw1217/Twitch-Channel-Points-Miner-v2 that referenced this issue Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐜 bug Something isn't working ☑ kinda-fixed
Projects
None yet
Development

No branches or pull requests

9 participants