You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "E:\Carte\BB\17 - Site Leadership\alte\Ionel Balauta\Aryeht\Task 1 - Traduce tot site-ul\Doar Google Web\Andreea\Meditatii\Sedinta 20 august 2022\Convert all html to PDF in a single book - BEBE.py", line 281, in <module>
save_to_pdf("c:\\Folder5\\")
File "E:\Carte\BB\17 - Site Leadership\alte\Ionel Balauta\Aryeht\Task 1 - Traduce tot site-ul\Doar Google Web\Andreea\Meditatii\Sedinta 20 august 2022\Convert all html to PDF in a single book - BEBE.py", line 246, in save_to_pdf
pdf.write_html(text=f'<p class="text_obisnuit2">{content[0]}</p>')
File "C:\Users\Castel\AppData\Roaming\Python\Python310\site-packages\fpdf\html.py", line 736, in write_html
h2p.feed(text)
File "C:\Program Files\Python39\lib\html\parser.py", line 110, in feed
self.goahead(0)
File "C:\Program Files\Python39\lib\html\parser.py", line 162, in goahead
self.handle_data(unescape(rawdata[i:j]))
File "C:\Users\Castel\AppData\Roaming\Python\Python310\site-packages\fpdf\html.py", line 287, in handle_data
self.pdf.write(self.h, data)
File "C:\Users\Castel\AppData\Roaming\Python\Python310\site-packages\fpdf\fpdf.py", line 317, in wrapper
return fn(self, *args, **kwargs)
File "C:\Users\Castel\AppData\Roaming\Python\Python310\site-packages\fpdf\fpdf.py", line 3274, in write
normalized_string = self.normalize_text(txt).replace("\r", "")
File "C:\Users\Castel\AppData\Roaming\Python\Python310\site-packages\fpdf\fpdf.py", line 3705, in normalize_text
raise FPDFUnicodeEncodingException(
fpdf.errors.FPDFUnicodeEncodingException: Character "–" at index 76 in text is outside the range of characters supported by the font used: "helveticaI". Please consider using a Unicode font.
The error message is telling you what's wrong: fpdf.errors.FPDFUnicodeEncodingException: Character "–" at index 76 in text is outside the range of characters supported by the font used: "helveticaI". Please consider using a Unicode font.
This is not the same character as - (U+2212) , the unicode of this – dash is U+2013
The Helvetica font doesn't support this character, so you need to use a different one, as RedShy mentioned in this comment before, because it also does not support the ş character (and many others in your text)
The text was updated successfully, but these errors were encountered: