Closed SomeRandomDude870 closed 3 years ago
Can you share one or more URLs that cause this error? Otherwise I'll need to check every character encoding method (which I should probably do anyway).
hmmm I had yesterday several that threw me an error, now I can only find one out of ten. https://chyoa.com/chapter/Introduction.235306
I have this one working fine for me. I'll have to try this on Windows to see if it works differently.
Just downloaded it, same error.
I set encoding to UTF-8 in most recent commit, request you to pull latest code and try running again.
Hi, I get here for some stories with txt,html and epub and error. epub and html will be produced normally, but Text files will throw this error and the txt file will only contain the Story- and author name.
Traceback (most recent call last): File "Ebook-Publisher.py", line 295, in <module> formats[ft](clas) File "Ebook-Publisher.py", line 33, in <lambda> 'html':lambda x:MakeHTML(x), File "Ebook-Publisher.py", line 81, in MakeHTML published.write('<h2 id = "'+site.depth[i-1]+'">'+site.chapters[i]+'\n</h2>\n'+str(site.rawstoryhtml[i])) File "C:\myProgramme\Python\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u202d' in position 512: character maps to <undefined>