Zequez / reddit-placebot

A bot that paints on Reddit /r/place. Works with multiple accounts, and can work with a remote target file for multiple people with the same objective.
MIT License
227 stars 78 forks source link

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Invalid BMP File #13

Closed ghost closed 7 years ago

ghost commented 7 years ago

apon attempting to run the bot I receive this error UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Invalid BMP File despite having the bot setup correctly with a correct BMP file. unless my bmp isn't correct. I can send it for reference if required but i'm pretty sure it's correct

Lenni commented 7 years ago

Try to create the BMP in Windows Paint with only the colors referenced in the colors.json

oliverhoerberg commented 7 years ago

Yeah, I have the same problem. I'm pretty sure mp BMP is correct, it couldn't be another issue?

Lenni commented 7 years ago

Can you upload your BMP somewhere, so I can check?

oliverhoerberg commented 7 years ago

This is mine: https://drive.google.com/file/d/0B8OapVHZ0_BsdGc1eXR6bUFxRk0/view?usp=sharing

Lenni commented 7 years ago

You habe to usw a 1000x1000 Version of the Image. The Areal oft the board which shouldnt be painted you can color with 255 0 255

ghost commented 7 years ago

the colors are correct with the reference in colors.json and still has the same error

ghost commented 7 years ago

https://puu.sh/v71PD/b767cd0120.bmp This is my BMP Is this right?

Lenni commented 7 years ago

Yes

ghost commented 7 years ago

then I have no idea why it doesn't work

Lenni commented 7 years ago

I noticed, that the image was heavily compressed. It took only 7KB of space. It should be more like ~3MB

ghost commented 7 years ago

hmmm ok thanks

Zequez commented 7 years ago

I just updated the Readme with all the requirements for the target file, could you check that everything meets the requirements? Also, I added a target.example.bmp and a board.example.bmp, you could try to modify them instead of creating it from scratch.

Zequez commented 7 years ago

Now the app support any kind of file (PNG, JPG or BMP) and any kind of colors (will do color matching), and it allows you to set the target starting position so you can use small images as target. So please update :P d5933e7a9c7caeabd7fb9c00c2ce489bf97ff2f8 4d6961d965c564e9e908adcafacbd25a63c1454f 7f9fcd01f412ff4b6b2a4dec93f4260304e45aa5