yy502 / ePaperDisplay

Python lib for WaveShare 4.3 inch e-paper display module, plus WiFi relay with ESP8266
71 stars 11 forks source link

IndexError: list index out of range #3

Closed BINCODINGD closed 7 years ago

BINCODINGD commented 7 years ago

Hi, I'm a student. I really need your help... I tried your code "4_level_gray_4bpp_BMP_converter.py"

and I did like that you said convert in.png -colorspace gray +matte -colors 4 -depth 2 -resize '800x600>' pgm:- | ./4_level_gray_4bpp_BMP_converter.py > out.bmp

but I have an error

File "./epaper.py", line 58, in width = int(data[DIMENTIONS].strip().split(' ')[0]) IndexError: list index out of range

I don't know what problem is. I think your code may be right... Is covert command changed? I really need your help... If you give me solution, I will be happy so much.. Thanks!!!

yy502 commented 7 years ago

hi,

Try the converter scripts in my repo as-is rather than running the command you mentioned above. Does it throw any exception?

BINCODINGD commented 7 years ago

Thank your comment. you mean just only python file?(I don't know about python at all but C++)

I did like below that Binui-MacBook-Pro:ePaperDisplay-master binsu$ python ePaper.py

and There is not any exception.

yy502 commented 7 years ago

hi, I meant to use my Bash script to convert the image as described in the README. Let me know how it goes.

BINCODINGD commented 7 years ago

Thank you so much! It works:D!!

I'm trying e-paper without wifi connection. Your code will help me. I'm happy. thanks!

yy502 commented 7 years ago

Great to know :-)