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

Major upgrade to Latexdoc #1061

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

prculley
Copy link
Contributor

See https://gramps-project.org/bugs/view.php?id=11166#c59480 Harald has rewritten the latexdoc plugin to deal with several issues.

@prculley
Copy link
Contributor Author

Traceback (most recent call last):
File "C:\Users\prc\workspace\GrampsM\main\gramps\gui\plug\report_reportdialog.py", line 706, in report
my_report = report_class(dialog.db, dialog.options, user)
File "C:\Users\prc\workspace\GrampsM\main\gramps\plugins\textreport\indivcomplete.py", line 127, in init
Report.init(self, database, options, user)
File "C:\Users\prc\workspace\GrampsM\main\gramps\gen\plug\report_reportbase.py", line 59, in init
self.doc.open(options_class.get_output())
File "C:\Users\prc\workspace\GrampsM\main\gramps\plugins\docgen\latexdoc.py", line 1045, in open
mapping_to_latex(filename, gramps_to_latex)
File "C:\Users\prc\workspace\GrampsM\main\gramps\plugins\docgen\latexdoc.py", line 568, in mapping_to_latex
csv_write.writerow([r'# 東京駅', r'Tokyo Station # transcription'])
File "C:\msys64\mingw64\lib\python3.6\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 2-4: character maps to

@lordemannd
Copy link
Contributor

lordemannd commented May 14, 2020

on Windows, I get same error.
Found a file named "mapping.csv" in the destination directory.
Retried the report and it completed. deleted the "mapping.csv", retried the report and got the failure.

my error report details include "csv_write.writerow([r'# 東京駅', r'Tokyo Station # transcription'])"

does the "mapping.csv" file need to be utf-8 encoded?
line 552:
               with open(mapping_file, newline='', encoding='utf-8') as csv_file:

@sam-m888 sam-m888 added this to the v5.2 milestone Sep 22, 2020
@Nick-Hall Nick-Hall marked this pull request as draft January 24, 2022 16:03
@Nick-Hall
Copy link
Member

I assume that this is still not ready for review.

@Nick-Hall Nick-Hall removed this from the v5.2 milestone Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants