Closed zxmb closed 4 years ago
Please update Pillow by running:
pip3 install --upgrade pillow
Thanks @sam210723 Linux and Python are difficult for me. I tried different operating systems.
Windows 10:
python enhance-ir.py -t \received\LRIT
Traceback (most recent call last):
File "enhance-ir.py", line 11, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
Raspberry Pi:
pi@raspberrypi:~/xrit-rx/tools $ python ./enhance-ir.py
~/xrit-rx/received/LRIT/20191229/FD -t
Traceback (most recent call last):
File "./enhance-ir.py", line 338, in <module>
init()
File "./enhance-ir.py", line 75, in init
gen_luts()
File "./enhance-ir.py", line 123, in gen_luts
sclut.append(clut[idx])
TypeError: list indices must be integers, not float
pi@raspberrypi:~/xrit-rx/tools $ python3 ./enhance-ir.py -t
~/xrit-rx/received/LRIT/20191229/FD
Processing
/home/pi/xrit-rx/received/LRIT/20191229/FD/IMG_FD_001_IR105_20191229_001006...
Traceback (most recent call last):
File "./enhance-ir.py", line 338, in <module>
init()
File "./enhance-ir.py", line 82, in init
handle_input(args.INPUT)
File "./enhance-ir.py", line 184, in handle_input
process(input)
File "./enhance-ir.py", line 244, in process
fnt = ImageFont.truetype("arialbd.ttf", size=38)
File "/home/pi/.local/lib/python3.7/site-packages/PIL/ImageFont.py", line
640, in truetype
return freetype(font)
File "/home/pi/.local/lib/python3.7/site-packages/PIL/ImageFont.py", line
637, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/home/pi/.local/lib/python3.7/site-packages/PIL/ImageFont.py", line
186, in __init__
font, size, index, encoding, layout_engine=layout_engine
OSError: cannot open resource
Windows 10:
You are missing the numpy
package. Install it using:
pip3 install numpy
Raspberry Pi: You are probably running the script using Python 2 rather than Python 3. Try using:
python3 enhance-ir.py ~/xrit-rx/received/LRIT/20191229/FD -t
rather than:
python enhance-ir.py ~/xrit-rx/received/LRIT/20191229/FD -t
Windows 10 OK!
Thank you!