Skip to content

test: fix weird string error - #21793

Closed
maclover7 wants to merge 1 commit into
nodejs:masterfrom
maclover7:jm-fix-string
Closed

test: fix weird string error#21793
maclover7 wants to merge 1 commit into
nodejs:masterfrom
maclover7:jm-fix-string

Conversation

@maclover7

Copy link
Copy Markdown
Contributor

Previously getting this error when running tap2junit (what parses our
.tap files in CI):

Traceback (most recent call last):
File "/usr/local/bin/tap2junit", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/tap2junit/__main__.py", line 46, in main
result.to_file(args.output, [result], prettyprint=False)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 289, in to_file
test_suites, prettyprint=prettyprint, encoding=encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 257, in to_xml_string
ts_xml = ts.build_xml_doc(encoding=encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 221, in build_xml_doc
attrs['message'] = decode(case.skipped_message, encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 68, in decode
ret = unicode(var)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 11: ordinal not in range(128)
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Previously getting this error when running `tap2junit` (what parses our
`.tap` files in CI):
```
Traceback (most recent call last):
File "/usr/local/bin/tap2junit", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/tap2junit/__main__.py", line 46, in main
result.to_file(args.output, [result], prettyprint=False)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 289, in to_file
test_suites, prettyprint=prettyprint, encoding=encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 257, in to_xml_string
ts_xml = ts.build_xml_doc(encoding=encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 221, in build_xml_doc
attrs['message'] = decode(case.skipped_message, encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 68, in decode
ret = unicode(var)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 11: ordinal not in range(128)
```
@maclover7
maclover7 requested a review from addaleaxJuly 13, 2018 16:02
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Jul 13, 2018
@maclover7

Copy link
Copy Markdown
ContributorAuthor

This, with #21791, will make --worker tests pass in CI :)

@addaleaxaddaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as a workaround, but please let’s also fix this upstream :/

@addaleaxaddaleax added the fast-track PRs that do not need to wait for 48 hours to land. label Jul 13, 2018
@maclover7

maclover7 commented Jul 13, 2018

Copy link
Copy Markdown
ContributorAuthor

Full CI: https://ci.nodejs.org/job/node-test-pull-request/15852/

Edit by @addaleax: CI came back green, please 👍 to approve fast-tracking

@addaleax

Copy link
Copy Markdown
Member

Landed in 2d95070, thanks!

addaleax pushed a commit that referenced this pull request Jul 13, 2018
Previously getting this error when running `tap2junit` (what parses our
`.tap` files in CI):
```
Traceback (most recent call last):
File "/usr/local/bin/tap2junit", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/tap2junit/__main__.py", line 46, in main
result.to_file(args.output, [result], prettyprint=False)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 289, in to_file
test_suites, prettyprint=prettyprint, encoding=encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 257, in to_xml_string
ts_xml = ts.build_xml_doc(encoding=encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 221, in build_xml_doc
attrs['message'] = decode(case.skipped_message, encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 68, in decode
ret = unicode(var)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 11: ordinal not in range(128)
```
PR-URL: #21793
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@maclover7
maclover7 deleted the jm-fix-string branch July 14, 2018 02:16
targos pushed a commit that referenced this pull request Jul 14, 2018
Previously getting this error when running `tap2junit` (what parses our
`.tap` files in CI):
```
Traceback (most recent call last):
File "/usr/local/bin/tap2junit", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/tap2junit/__main__.py", line 46, in main
result.to_file(args.output, [result], prettyprint=False)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 289, in to_file
test_suites, prettyprint=prettyprint, encoding=encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 257, in to_xml_string
ts_xml = ts.build_xml_doc(encoding=encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 221, in build_xml_doc
attrs['message'] = decode(case.skipped_message, encoding)
File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 68, in decode
ret = unicode(var)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 11: ordinal not in range(128)
```
PR-URL: #21793
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@targostargos mentioned this pull request Jul 17, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-trackPRs that do not need to wait for 48 hours to land.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@maclover7@nodejs-github-bot@addaleax@lpinca