RogerioBlanco / PixelCanvasBot

A bot to pixelcanvas.io
63 stars 24 forks source link

KeyError: 'waitSeconds' #60

Closed Colinot closed 6 years ago

Colinot commented 7 years ago

generating converted image here : /Users/lonestar/PixelCanvasBot/img/.cache/baa57b576ba00f59b01252df77d08600.png Saved image cache file, Loading Now... Traceback (most recent call last): File "./main.py", line 62, in <module> main() File "./main.py", line 58, in main run() File "./main.py", line 53, in run bot.run() File "/Users/lonestar/PixelCanvasBot/src/bot.py", line 32, in run self.wait_time(me) File "/Users/lonestar/PixelCanvasBot/src/bot.py", line 56, in wait_time if data['waitSeconds'] is not None: KeyError: 'waitSeconds'

def wait_time(self, data = {'waitSeconds':None}): def complete(i, wait): return ((100 * (float(i) / float(wait))) * 20) / 100

    if data['waitSeconds'] is not None:
        wait = data['waitSeconds'] + (random.randint(0, 9) / 10.0)
        print(I18n.get('Waiting %s seconds') % str(wait))

        c = i = 0
        while c < 20:
            c = complete(i, wait)
            time.sleep(wait - i if i == int(wait) else 1)
            out.write("[{}]\0\r".format('+' * int(c) + '-' * (20 - int(c))))
            out.flush()
            i += 1
        out.write("\n")
        out.flush()`

print(data) at line 55 in bot.py prints : Exception in thread Thread-1 (most likely raised during interpreter shutdown):%

Qh0stM4N commented 7 years ago

Is the issue new, bot worked fine before, or you tried to run it for the first time?

Qh0stM4N commented 7 years ago

@colpyin testet my pc all is well

C:\Users\Ok\Desktop\eX.desktop\PixelCanvasBot>python ./main.py -i img/img.png -f 0123456789abcdef0123456789abcdef -x 0 -y 0 generating converted image here : C:\Users\someuser\Desktop\eX.desktop\PixelCanvasBot/img/.cache/19438e71f316c1b4682a5be9298b7958.png Saved image cache file, Loading Now...

13:56:41 ->Websockete baglanildi 13:56:41 ->Birisi -227,-1837 burayi beyaz renge boyadi 13:56:41 ->beyaz rengi -227,-1837 konumuna birakildi 13:56:41 -> 120.951 Saniye bekleniliyor.... [++------------------]

Qh0stM4N commented 7 years ago

64 move here.

Ungreatly commented 6 years ago

I found a fix for this just now.

python ./main.py -i image.png -f $FINGERPRINT$ -x 0 -y 0

when putting in your fingerprint remove the dollar signs surrounding it and it should be fixed. I had the same problem

ZeedyDF commented 6 years ago

Problaby u got the wrong fingerprint of your browser, make sure that u got it right. F12, Place a pixel go to headers and get the fingerprint, and example for how to execute it is,

python main.py -i IMAGE.PNG -f ejRJHDiRXoLoHVDfXZMCkjKhmAeSuPmn -x 0 -y 0

Qh0stM4N commented 6 years ago

@ZeedyPixel this issue is really a problem not a except for the wrong use. I can not preview it. Maybe it's because the system is disconnected because the pixel canvas site does not look like it's not working. There's something I'm not sure about here. If I tried to simulate again, I failed. I need more feedback so I can solve this problem.

Qh0stM4N commented 6 years ago

Closed issue abonded with author