Closed blajoie closed 4 years ago
And ran into a error unless I explicitly set the below?
export PYTHONIOENCODING=UTF-8
error
Traceback (most recent call last):
File "/opt/conda/envs/kevlar-env/bin/kevlar", line 8, in <module>
sys.exit(main())
File "/opt/conda/envs/kevlar-env/lib/python3.6/site-packages/kevlar/__main__.py", line 24, in main
kevlar.cli.parser().parse_args(['-h'])
File "/opt/conda/envs/kevlar-env/lib/python3.6/argparse.py", line 1734, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/opt/conda/envs/kevlar-env/lib/python3.6/argparse.py", line 1766, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/opt/conda/envs/kevlar-env/lib/python3.6/argparse.py", line 1972, in _parse_known_args
start_index = consume_optional(start_index)
File "/opt/conda/envs/kevlar-env/lib/python3.6/argparse.py", line 1912, in consume_optional
take_action(action, args, option_string)
File "/opt/conda/envs/kevlar-env/lib/python3.6/argparse.py", line 1840, in take_action
action(self, namespace, argument_values, option_string)
File "/opt/conda/envs/kevlar-env/lib/python3.6/argparse.py", line 1024, in __call__
parser.print_help()
File "/opt/conda/envs/kevlar-env/lib/python3.6/argparse.py", line 2366, in print_help
self._print_message(self.format_help(), file)
File "/opt/conda/envs/kevlar-env/lib/python3.6/argparse.py", line 2372, in _print_message
file.write(message)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 48-116: ordinal not in range(128)
The encoding issue is almost certainly related to these non-ASCII characters.
But including this line at the top of the file has always fixed the issue for me.
Which version of kevlar are you using?
Have you tried setting a locale on the Docker image? I frequently run into these kind of issues when building Docker/Singularity images from a clean OS without common settings configured/packages installed.
Which version of kevlar are you using?
Looking closer at your Docker build, you're installing kevlar directly from PyPI. Some changes have been made to kevlar since the latest release, including support for network ≥2.0. For example, the code below has already fixed one of the issues you described up above.
I don't know when I'll have time to make a new stable release, but in the mean time I think you'll have to choose:
Perfect thanks. Appreciate the speedy response. Will try the latest kevlar from github with networkx >= 2.0
Thanks again - that did the trick. Also had to explicitly set the locale on my machine/docker-image.
export LC_ALL=C.UTF-8
git clone https://github.com/kevlar-dev/kevlar.git /git/kevlar && \
cd /git/kevlar && \
make devenv && \
pip install -e . &&\
pytest --pyargs kevlar.tests
All tests now pass.
388 passed in 105.88s (0:01:45)
platform linux -- Python 3.6.10, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
Ran into the below while attempting to construct a docker-image and then run the pytests.
Looks like some sort of install/config issue? Any suggestions?
example failures
Also ran into an error while running the example workflow