-
Notifications
You must be signed in to change notification settings - Fork 326
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
Multiple Lines of Error when Streamer Goes Offline #250
Comments
I found the problem. SOMEHOW a rouge -1 got inserted into my config when I checked it. Removed it. Problem solved - User Error |
Okay.. so I had found the rouge -1 in my run.py and I removed it... A streamer went offline and the error persisted... I checked my run.py again and even tried the find option to find a -1 and I couldn't find any... so I don't know what's causing this. Not script breaking... just spams my console when someone goes offline.. |
Well, we need logs to analyze. |
Related to the IRC (chat) client.
|
What do you mean by "rouge -1"? Could you elaborate here and give some specifics? |
When I checked my run.py I found a -1 at the beginning of where I specified what colors I wanted in the console for each event. I removed it thinking that was the problem. It was not the problem. Obviously it didn't need to be in there, and I'm not sure how it got in there, but that was not what is causing this error when someone goes off line. I'm farming two twitch accounts. Fresh installs on a Mac OS. Everything is identical down to the run.pys with the log in information, discord webhook links, and telegram bot information being different respectively. Only one of the accounts is experiencing this problem. |
I checked my chat.py file, it matches the github exactly. |
Logs. |
I'm chalking this up to a corrupted file. I took a copy of the working install I had and replaced all of the ones in the bad file (except for the cookies and run.py), it is now working properly. So I'm going to just chalk this up as a corrupted file. I thank you of helping me with this issue, and I'll be closing this out. |
And now it's back and on both instances. Let me grab logs. To properly get them I need to enable logs, start the script, wait for error, then disable the script and get the logs from the logs folder right @rdavydov ? |
Yes. |
So as luck would have it.. I had logging turned on, on one of the instances. The problem is.. the log is SO large I can't get it to paste anywhere for viewing. Pastebin freezes, and gist gives me the unicorn error page. |
I can do this though... The log file is inside the zip. That's the best I can do. I've tried Gist numerous times on different machines, and even pastebin. The log is 53 mb, but both sites just refuse to accept it. |
Still no idea what's causing this? @rdavydov |
So this problem is still going on. I've enabled logs again, and will try to get a fresh set of logs. |
@rdavydov So I'm having a problem getting fresh logs. I have the level set to debug, but the log is generating over 100K+ lines (like 250MB+ size logs) before the error happens (someone goes offline). As such, because it's so big, I can't paste it into pastebin, or gist, or even upload a compressed .zip here. |
Doing a little research, maybe this is the cause of the error? https://www.askpython.com/python/examples/debug-ioerror-errno9-bad-file-descriptor-in-os-system From editing the run.py files? Maybe MacOS isn't closing them properly? |
I've also encountered this error whenever a streamer goes offline. 19/08/23 18:07:52 - INFO - [stop]: 💬 Leave IRC Chat: xxxx The last error message is repeated about 100x as a warning, but it doesn't affect the rest of the script continuing to run. |
@rdavydov Reading this - https://www.askpython.com/python/examples/debug-ioerror-errno9-bad-file-descriptor-in-os-system And looking at when the error comes up... it looks like this is attributed to something with chat. It only displays this error when the miner leaves the IRC chat of a channel. So possibly there's something with the chat.py file that it's not closed properly as mentioned in the link above? I'm wondering if I set the config to never leave the IRC channel if that will stop the error, but then I also wonder what affect that will have on drops. I think I'll take the risk and test it, and I'll report back in a few days, so the miner has time to cycle through a few streams. |
So this didn't take long to test. Having chat presence set to online, you're able to farm two channels for points at one time, and the miner works as intended, prioritize drops, then the channels you want to farm for points in the order you've set them. When a channel goes off line, and the miner exits the irc, this error is spammed. Having the presence set to always prevents the error.. but you only farm one channel at a time, and it's prioritizing the channel that recently came online, ignoring if channels that have drops and the order you've set channels you want to farm. I believe this would affect drops and cause users to miss out on them. This leads me to believe that there is a file related to the irc chat that isn't coded correctly to close properly, in accordance with the link. I suspect chat.py is the culprit, as that's the only thing I could find in the files that relates to any of this, but I don't know enough to determine whst exactly I'm looking at. I'm setting the presence back to online, as the error doesn't affect the miner, just annoying to see the error spammed. Hopefully this helps debug and determine where the error is coming from @rdavydov. |
I recently encountered this error by chance when looking at my logs. I checked the last week's worth of logs and it looks like it had only occurred once. The relevant lines are:
This is the code that processes that message: Twitch-Channel-Points-Miner-v2/TwitchChannelPointsMiner/classes/WebSocketsPool.py Lines 233 to 235 in 62c01c4
Looking through the code, in response to a
I believe this is where a race condition happens. This final method sets At the same time as this is happening we also have
As previously noted by @rdavydov, that call to Since these 2 things (processing the connection and responding to I believe a simple fix to this is to set def die(self, msg="Bye, cruel world!"):
self.__active = False
self.connection.disconnect(msg) That should allow the while loop to exit early. It doesn't look like anything else relies on |
Describe the bug
https://i.imgur.com/HOu3ToI.png
When a streamer goes offline, my terminal is spammed with this message. The script itself is working flawlessly and running just fine. This error doesn't stop the script either. It's only when someone goes offline.
I assume I've got something wrong in my run.py? But I'm not exactly sure what it would be?
Steps to reproduce
N/A - User Error?
Expected behavior
Not to have this error?
Operating system
Mac OS Monterey
Python version
3.8.X
Miner version
1.8.1
Other relevant software versions
No response
Logs
N/A at this time - Just noticed it, would have to wait for someone to go offline again w/ logs enabled, log file would be huge.
Additional context
No response
The text was updated successfully, but these errors were encountered: