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

Error: 'charmap' codec can't decode byte 0x8f in position 156 #388

Closed
minggangw opened this issue Jun 16, 2019 · 9 comments · Fixed by #390
Closed

Error: 'charmap' codec can't decode byte 0x8f in position 156 #388

minggangw opened this issue Jun 16, 2019 · 9 comments · Fixed by #390
Assignees
Labels
bug Something isn't working

Comments

@minggangw
Copy link

Bug report

Required Info:

Steps to reproduce issue

Pass the path of WStrings.msg as the parameter of Python method parse_message_file

Expected behavior

Execute successfully

Actual behavior

Error: 'charmap' codec can't decode byte 0x8f in position 156: character maps to

Additional information

Thanks!

@sloretz
Copy link
Contributor

sloretz commented Jun 17, 2019

This sounds little bit like ros2/system_tests#362 (comment) . Maybe WStrings.msg needs a byte order mark? Alternatively, maybe parse_message_file() needs to expose an encoding keyword arg for the call to open()?

@minggangw
Copy link
Author

Maybe it's kind of Python version of it.

@dirk-thomas
Copy link
Member

Any generated source file which contains non-ASCII characters (coming from e.g. default values in the interface file) needs to include a BOM.

@dirk-thomas dirk-thomas transferred this issue from ros2/ros2 Jul 15, 2019
@dirk-thomas
Copy link
Member

I misread the description and comments and assumed the problem was in generated C / C++ code.

Since this actually happens when reading the interface file I think #390 should be sufficient to resolve your problem. @minggangw please comment here if it addressed your problem.

@dirk-thomas dirk-thomas added the bug Something isn't working label Jul 18, 2019
@dirk-thomas dirk-thomas self-assigned this Jul 18, 2019
@dirk-thomas
Copy link
Member

dirk-thomas commented Jul 19, 2019

Reopening since there are follow up issues when using non-ASCII character in e.g. default values:

@dirk-thomas
Copy link
Member

dirk-thomas commented Jul 26, 2019

With all PRs rebased to address other unrelated test failures I triggered an full round of CI builds to double check for regressions:

  • Linux Build Status (unrelated test failure, also happening in nightly)
  • Linux-aarch64 Build Status
  • macOS Build Status (FastRTPS pub WStrings to Connext sub fails, skipped by ros2/system_tests@49cdb2f)
  • Windows Build Status (unrelated test failures)

@minggangw
Copy link
Author

This problem is fixed, I verified it on https://ci.appveyor.com/project/minggangw/rclnodejs/builds/26335124, thanks!

@dirk-thomas
Copy link
Member

Until the list of pending PRs is merged we will keep this ticket open.

@dirk-thomas dirk-thomas reopened this Jul 30, 2019
@dirk-thomas
Copy link
Member

dirk-thomas commented Jul 30, 2019

I disabled one case which doesn't seem to work cross vendor: ros2/system_tests@5d100b6

Hopefully the final round of CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status (unrelated failures)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants