Open bart-r-willems opened 2 weeks ago
Encountering the same issue when trying to utilize a Unicode character in the heading section (in lieu of an image). Unable to figure out a workaround yet without just removing the character.
I just tested it, with my fix in place that works without issues (windows 10, python 3.12.4)
On Sat, Sep 14, 2024 at 8:58 AM HansMellman @.***> wrote:
Encountering the same issue when trying to utilize a Unicode character in the heading section (in lieu of an image). Unable to figure out a workaround yet without just removing the character.
— Reply to this email directly, view it on GitHub https://github.com/posit-dev/great-tables/issues/440#issuecomment-2350982021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOWAQKP6H4EUPFPID7H263ZWQXHFAVCNFSM6AAAAABODZ26S6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJQHE4DEMBSGE . You are receiving this because you authored the thread.Message ID: @.***>
You sir, are wonderful. Thank you for that - did the trick perfectly! Hopefully they'll be able to implement the fix natively.
Description
When saving a table with the
save
message, an exception occurs in Windows.Reproducible example
df.pipe(GT).save('test.pdf')
The bottom of the stack trace shows this
Note that the error occurs due to CP1252 encoding which is the default. I fixed it by adding
encoding='utf-8'
ib line 309 of the _export.py file:(Sorry I'm not comfortable with pull requests I don't want to ruin anything)
Expected result
A file
test.pdf
should be createdDevelopment environment