diff --git a/README.md b/README.md index d6b1a6d328470016749f6ad279d302bd9a813638..e372ac9ca40b4a2e26cfad5ca4deed7cc22ab277 100644 --- a/README.md +++ b/README.md @@ -193,3 +193,4 @@ JULIA_PROJECT=<path> scripts/larvatagger.jl train ``` with `<path>` the path of the Julia project with TaggingBackends installed. +Note however that the last command above will not work if Julia was installed using juliaup. Prefer [jill](https://pypi.org/project/jill/). diff --git a/src/taggingbackends/explorer.py b/src/taggingbackends/explorer.py index c8d123adee3324458ca7e256225783ab820b6067..2f0e14f242d93b814ed48f27cb1e4ec52c111bca 100644 --- a/src/taggingbackends/explorer.py +++ b/src/taggingbackends/explorer.py @@ -14,15 +14,15 @@ JULIA_PROJECT = os.environ.get('JULIA_PROJECT', '') try: from julia import Julia Julia(compiled_modules=False) -except ImportError: +except: logging.warning(f"PyCall not found in JULIA_PROJECT={JULIA_PROJECT}; \ - please see https://gitlab.pasteur.fr/nyx/TaggingBackends#recommended-installation") +please see https://gitlab.pasteur.fr/nyx/TaggingBackends#recommended-installation") else: try: from julia import TaggingBackends except ImportError: logging.warning(f"TaggingBackends not found in JULIA_PROJECT={JULIA_PROJECT}; \ - please see https://gitlab.pasteur.fr/nyx/TaggingBackends#recommended-installation") +please see https://gitlab.pasteur.fr/nyx/TaggingBackends#recommended-installation") def getlogger(name): logger = logging.getLogger(name) @@ -155,7 +155,10 @@ Cannot find any Python package in project root directory: logger.info("\n".join(lines)) log(line[len(prefix):].lstrip()) return [] - lines.append(line) + if line.startswith(" warn(") or line.startswith(" warnings.warn("): + pass + else: + lines.append(line) return lines def _parse_stderr(self, logger, lines, line):