Skip to content

MacOS + python 3.6 users  #35

@TanShengRong

Description

@TanShengRong

Font not found

Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/init.py", line 1699, in call
return self.func(*args)
File "wuxiaworld2ebook.py", line 59, in button_press
getify.cover_generator(raw_info[4], s_chapter, str(e_chapter))
File "/Users/stan170/Desktop/wuxia/Wuxiaworld-2-eBook/getify.py", line 101, in cover_generator
thefont = ImageFont.truetype("arial.ttf", 75)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PIL/ImageFont.py", line 259, in truetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PIL/ImageFont.py", line 143, in init
self.font = core.getfont(font, size, index, encoding, layout_engine=layout_engine)
OSError: cannot open resource

  • PIL.ImageFont.truetype doesn't search in Mac font folder unlike Windows..
  • Soln: drop Arial.ttf in working dir/ change dir

SSL: CERTIFICATE_VERIFY_FAILED for python 3.6

URL: http://www.wuxiaworld.com/novel/7-killers/7k-chapter-1, URLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)
URL: http://www.wuxiaworld.com/novel/7-killers/7k-chapter-2, URLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)
Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/init.py", line 1699, in call
return self.func(*args)
File "wuxiaworld2ebook.py", line 85, in button_press
getify.generate(file_list, raw_info[0], raw_info[3], raw_info[2], reset, str(e_chapter), cleanup=cleanup)
File "/Users/stan170/Desktop/wuxia/Wuxiaworld-2-eBook/getify.py", line 172, in generate
epub.write(html, "OEBPS/"+basename)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/zipfile.py", line 1594, in write
zinfo = ZipInfo.from_file(filename, arcname)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/zipfile.py", line 484, in from_file
st = os.stat(filename)
FileNotFoundError: [Errno 2] No such file or directory: '7 Killers/7k-chapter-1.xhtml'

Thought it might be useful for OSx noobs like me so that they don't have to google.

Thanks for all your work

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions