Git Product home page Git Product logo

Comments (13)

sharkbound avatar sharkbound commented on June 8, 2024

Is this right tool to use and does it get "real" bits donated or can viewers do fake donations

the bot checks the irc message tags/metadata, which to my knowledge cannot be faked

i am also working on a pubsub client built in as well, but its not in the current release

as for the crash, it seems like a key error, which is solved easy enough

from pythontwitchbotframework.

123Remo avatar 123Remo commented on June 8, 2024

Ok nice to hear! Ill wait fix 👍 And thanks for great program & quick answer too!

from pythontwitchbotframework.

sharkbound avatar sharkbound commented on June 8, 2024

i am trying to do a fix, having git related issues with trying to apply it to 2 branches.
will update when its done

from pythontwitchbotframework.

sharkbound avatar sharkbound commented on June 8, 2024

finishing the fix now, i had to guess at the issue due to how vague async errors are at times, so i will keep this open until its pushed and you can test it in your environment

from pythontwitchbotframework.

sharkbound avatar sharkbound commented on June 8, 2024

i pushed a potential fix in pypi version 1.13.0

from pythontwitchbotframework.

123Remo avatar 123Remo commented on June 8, 2024

Ok i did pip3 uninstall and then installed 1.13.0 version now when i run it ill get error.

Traceback (most recent call last):
File "test.py", line 5, in
from twitchbot.bots import BaseBot
File "/home/pi/.local/lib/python3.7/site-packages/twitchbot/init.py", line 15, in
from .bots import *
File "/home/pi/.local/lib/python3.7/site-packages/twitchbot/bots/init.py", line 1, in
from .basebot import *
File "/home/pi/.local/lib/python3.7/site-packages/twitchbot/bots/basebot.py", line 31, in
from ..pubsub import PubSubClient
File "/home/pi/.local/lib/python3.7/site-packages/twitchbot/pubsub/init.py", line 1, in
from .client import *
File "/home/pi/.local/lib/python3.7/site-packages/twitchbot/pubsub/client.py", line 14, in
from .models import PubSubData
File "/home/pi/.local/lib/python3.7/site-packages/twitchbot/pubsub/models.py", line 5, in
from functools import cached_property
ImportError: cannot import name 'cached_property' from 'functools' (/usr/lib/python3.7/functools.py)

from pythontwitchbotframework.

123Remo avatar 123Remo commented on June 8, 2024

Ok looks like functools is not in Python 3.7 so iam upgrading to 3.8 right now

from pythontwitchbotframework.

123Remo avatar 123Remo commented on June 8, 2024

Ok got it running now and !s dont crash bot anymore. However some messages are prompted when i start the bot.

Starting bot...
/usr/local/lib/python3.8/site-packages/aiohttp-4.0.0a1-py3.8-linux-armv7l.egg/aiohttp/client.py:977: RuntimeWarning: coroutine 'noop' was never awaited
self._resp.release()
RuntimeWarning: Enable tracemalloc to get the object allocation `traceback

And after some time pass messages below appear but bot will continue running.

Task exception was never retrieved
future: <Task finished name='Task-17' coro=<PubSubClient._processor_loop() done, defined at /usr/local/lib/python3.8/site-packages/PythonTwitchBotFramework-1.13.0-py3.8.egg/twitchbot/pubsub/client.py:112> exception=ConnectionClosedError('code = 1006 (connection closed abnormally [internal]), no reason')>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/websockets-8.1-py3.8-linux-armv7l.egg/websockets/protocol.py", line 827, in transfer_data
message = await self.read_message()
File "/usr/local/lib/python3.8/site-packages/websockets-8.1-py3.8-linux-armv7l.egg/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/local/lib/python3.8/site-packages/websockets-8.1-py3.8-linux-armv7l.egg/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/local/lib/python3.8/site-packages/websockets-8.1-py3.8-linux-armv7l.egg/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/usr/local/lib/python3.8/site-packages/websockets-8.1-py3.8-linux-armv7l.egg/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/local/lib/python3.8/asyncio/streams.py", line 738, in readexactly
raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/PythonTwitchBotFramework-1.13.0-py3.8.egg/twitchbot/pubsub/client.py", line 116, in _processor_loop
await self._read_and_handle()
File "/usr/local/lib/python3.8/site-packages/PythonTwitchBotFramework-1.13.0-py3.8.egg/twitchbot/pubsub/client.py", line 125, in _read_and_handle
raw_resp = await self.read(timeout=10)
File "/usr/local/lib/python3.8/site-packages/PythonTwitchBotFramework-1.13.0-py3.8.egg/twitchbot/pubsub/client.py", line 94, in read
data = await asyncio.wait_for(self.socket.recv(), timeout=timeout)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/usr/local/lib/python3.8/site-packages/websockets-8.1-py3.8-linux-armv7l.egg/websockets/protocol.py", line 509, in recv
await self.ensure_open()
File "/usr/local/lib/python3.8/site-packages/websockets-8.1-py3.8-linux-armv7l.egg/websockets/protocol.py", line 803, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason

from pythontwitchbotframework.

sharkbound avatar sharkbound commented on June 8, 2024

those both seem related to PUBSUB client stuff, it should not affect bot usage, unless you are using the pubsub client the bot includes

from pythontwitchbotframework.

sharkbound avatar sharkbound commented on June 8, 2024

i will look into the pubsub errors though, pubsub client that comes with the bot is still being worked on

from pythontwitchbotframework.

123Remo avatar 123Remo commented on June 8, 2024

Well its working great! It might be first time someone use your bot on raspberry pi + diy bird feeder? :) If you want to try it whisper me at twitch so i add you as VIP to use it free. My stream with feeder is here https://www.twitch.tv/wildlifestreamer2

Cheers!

from pythontwitchbotframework.

sharkbound avatar sharkbound commented on June 8, 2024

i will be pushing a update to fix the connection errors at starts (and few mins after), found out its when pubsub is not used, so twitch (or the socket) closes the connection
i will let you know when its out

from pythontwitchbotframework.

sharkbound avatar sharkbound commented on June 8, 2024

pypi version 1.13.1 should have fixed the connection issues on startup, if you care about it

from pythontwitchbotframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.