galaxyproject / galaxyproject/planemo
Planemo + R = 'ascii' codec can't encode character u'\u2018'
- Dominant language
- Python
- Stars
- 110
- Forks
- 102
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 13
Description
Hi all,
I'm used to wrap some R script/libary. And R is used to display in the stderr this kind of message:
```
Warning messages:
1: replacing previous import by ‘ggplot2::unit’ when loading ‘Hmisc’
2: replacing previous import by ‘ggplot2::arrow’ when loading ‘Hmisc’
3: replacing previous import by ‘scales::alpha’ when loading ‘Hmisc’
```
or
```
Error in library("foobar") : there is no package called ‘foobar’
```
`planemo test` seems to dislike those `‘` and `’` when displaying the logs both in the stacks and in the HTML report:
```
======================================================================
ERROR: IPO for xcmsSet ( ipo4xcmsSet ) > Test-1
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/tmpxRw9ls/galaxy-dev/test/functional/test_toolbox.py", line 299, in test_tool
self.do_it( td )
File "/tmp/tmpxRw9ls/galaxy-dev/test/functional/test_toolbox.py", line 78, in do_it
raise e
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 121: ordinal not in range(128)
```
Consequence: the test fails even if the script is processed normally and you don't know exactly what append.
For the record:
I managed to go through the first case using `suppressWarnings()`:
`suppressWarnings( suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE))))`
That was my feedback!
Cheers
Contributor guide
Assessment
This issue has not been assessed yet.