Oserror: cannot open resource (pilot error handling)

Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>

https://www.jianshu.com/p/c64ae3e9b196

Oserror: can’t open resource error handling in using memo of pilot

In the process of using pilot, python program appears: oserror: cannot open resource prompt

Pilot error prompt

File "E:\06_python\python_demo\MyBlog\web\views\account.py", line 89, in test2
    img, code = create_validate_code()
  File "E:\06_python\python_demo\MyBlog\utils\check_code.py", line 92, in create_validate_code
    strs = create_strs()
  File "E:\06_python\python_demo\MyBlog\utils\check_code.py", line 80, in create_strs
    font = ImageFont.truetype(font_type, font_size)
  File "C:\Users\ic\AppData\Local\Programs\Python\Python35\lib\site-packages\PIL\ImageFont.py", line 280, in truetype
    return FreeTypeFont(font, size, index, encoding, layout_engine)
  File "C:\Users\ic\AppData\Local\Programs\Python\Python35\lib\site-packages\PIL\ImageFont.py", line 145, in __init__
    layout_engine=layout_engine)
OSError: cannot open resource
[11/May/2019 15:07:57] "GET /test2.html HTTP/1.1" 500 92941
Performing system checks...

This is a common font problem
in the windows environment, the font is usually located in the C:// Windows/fonts folder. Users can check whether the font specified in the python program exists in this folder

Similar Posts: