Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS + python 3.6 users #35

Open
TanShengRong opened this issue Dec 4, 2018 · 2 comments
Open

MacOS + python 3.6 users #35

TanShengRong opened this issue Dec 4, 2018 · 2 comments
Labels

Comments

@TanShengRong
Copy link

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

@MrHaCkEr
Copy link
Collaborator

MrHaCkEr commented Dec 5, 2018

I'm sorry for your mediocre experience with this script.

I'm currently working on an implementation of this script in a django webapp as a side project. That will fix the inconsistencies in quality between operating systems and make the whole process more user friendly.

For now I'll leave this issue open and mention it in the ReadMe. If I find the time I'll do some QA on a mac.

Tha is for reporting the issue!

@MichaelGuardian
Copy link
Contributor

Both issues fixed on novel-ebook.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants