sirPinwheel / XY_painter_for_twitch

A script that connects to twitch channel's chat and draws an image pixel by pixel using [X Y #RRGGBB] format
GNU General Public License v3.0
3 stars 0 forks source link

Crashed(?) during painting #3

Open OkayOkayOkayOkay opened 4 years ago

OkayOkayOkayOkay commented 4 years ago

Suddenly the script closed/crashed during the process. What do I do now? Is there any way to continue it without starting all again? I don't remember what was the starting point as well.

*I can see the last message on the twitch chat: !240 659 #221e22

Maybe you should add some kind of history folder so it can keep track of unfinished/finished pictures and what was the last point

sirPinwheel commented 4 years ago

It didn't crash for me yet, but if it does for you that means there's something i need to work on. I'll add some rudimentary logging, so you'll be able to upload the exact error that occured. Also i'll add some kind of offset you can choose when launching the bot so the drawing process will start from that point instead of bottom left most pixel.

sirPinwheel commented 4 years ago

Meanwhile if you can link or upload the exact picture you were drawing i should be able to tell you the starting coordinates. You'll have to wait for that tho, im not currently at home

OkayOkayOkayOkay commented 4 years ago

How would you be able to tell what was the starting coordinates? Anyway, here is the picture: https://imgur.com/a/FUBdF1C

sirPinwheel commented 4 years ago

Seems to be X:100 Y:600, or 601. It's simple, the stream is fullHD and i have fullHD monitor, i fullscreen the stream, take a screenshot and Put both the screenshot and the picture into GIMP and aligh it to the pixel, and just check the first pixel of the picture.

Im attaching a missing part of the picture on a fullHD canvas, just give it to the bot, set both X and Y to 0, the picture is already set where it should. It'll complete the drawing without re-doing the whole thing

remaining

OkayOkayOkayOkay commented 4 years ago

Haha cool, thank you!

OkayOkayOkayOkay commented 4 years ago

Well, now it didn't crash but it seems the connection was lost:

Start drawing at X: 0 Start drawing at Y: 0 drawing C:\Users\USER\Pictures\PixelArt\Girantis_Left.png at 0 x 0 Traceback (most recent call last): File "D:\Python\XY_painter_for_twitch-master\XY_painter_for_twitch-master\main.py", line 81, in <module> if __name__ == "__main__": main() File "D:\Python\XY_painter_for_twitch-master\XY_painter_for_twitch-master\main.py", line 74, in main draw(sys.argv[1], start_x, start_y) File "D:\Python\XY_painter_for_twitch-master\XY_painter_for_twitch-master\main.py", line 62, in draw irc().send_message(f'!{str(cords[0])} {str(cords[1])} #{color}') File "D:\Python\XY_painter_for_twitch-master\XY_painter_for_twitch-master\irc_client.py", line 191, in send_message self._send_data(f'PRIVMSG {self._channel} :{message}\r\n'.encode('utf-8')) File "D:\Python\XY_painter_for_twitch-master\XY_painter_for_twitch-master\irc_client.py", line 165, in _send_data data_sent += self._connection.send(data[data_sent:]) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\ssl.py", line 1173, in send return self._sslobj.write(data) ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2457)

Looking forward some solution so you can continue the picture if it was stopped.

OkayOkayOkayOkay commented 4 years ago

Connection was lost again. Have you made anything that can keep track of last pixels drawn and be able to keep the picture from there?

sirPinwheel commented 4 years ago

Haven't had time just yet, hopefully i'll fix it by monday

OkayOkayOkayOkay commented 4 years ago

Update?