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

Problem with parsing unicode characters in v1.1.6 of Excel2LDR #28

Open
jyucsiro opened this issue Sep 25, 2018 · 1 comment
Open

Problem with parsing unicode characters in v1.1.6 of Excel2LDR #28

jyucsiro opened this issue Sep 25, 2018 · 1 comment

Comments

@jyucsiro
Copy link
Contributor

Problem with parsing unicode characters in v1.1.6 of Excel2LDR.

Traceback (most recent call last):
File "C:/Repositories/git/github/csiro-env-info/ldrpyutils/gui/Excel2ldrGui.py", line 174, in OnSend
self.run()
File "C:/Repositories/git/github/csiro-env-info/ldrpyutils/gui/Excel2ldrGui.py", line 232, in run
verbose=verbose
File "C:\Repositories\git\github\csiro-env-info\ldrpyutils\ldrpyutils\core.py", line 60, in load_simple_file
verbose=verbose
File "C:\Repositories\git\github\csiro-env-info\ldrpyutils\ldrpyutils\core.py", line 237, in build_graph_and_post
subreg_graph = get_subregister_graph(sub_reg_id, reglabel, regdescription, prefix_idx, nsMgr)
File "C:\Repositories\git\github\csiro-env-info\ldrpyutils\ldrpyutils\core.py", line 324, in get_subregister_graph
graph.add((subreg, DCT.description, Literal(str(regdescription))))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 22: ordinal not in range(128)

@jyucsiro
Copy link
Contributor Author

This problem is thrown up if using python2.7 as the base. However, in python3, this isn't an issue.

Solution: compile excel2ldr using python3.

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

No branches or pull requests

1 participant