Non-ASCII character in .py, no encoding declared
greenkidneybean opened this issue Β· comments
When running snakemake --use-conda
from the project root of the project directory I get the following error (line 43 of attached
snakemake.log):
SyntaxError: Non-ASCII character '\xc3' in file /spin1/users/chambersmj/snakemake_test/.snakemake/scripts/tmpmfjaxtfh.wrapper.py on line 5, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
I thought of adding #coding=utf-8
to the head of .snakemake/scripts/tmpmfjaxtfh.wrapper.py but there are no scripts in the .snakemake/scripts directory.
Any suggestions to resolve the python source file encoding would be greatly appreciated π
Note: I've also attached the default config.yaml, the project tree is below, and the data directory was cloned from snakemake-workflows/ngs-test-data.
snakemake_test
βββ config.txt
βββ config.yaml
βββ data
βββ envs
βββ LICENSE
βββ logs
βββ mapped
βββ README.md
βββ report
βββ rules
βββ samples.tsv
βββ schemas
βββ scripts
βββ Snakefile
βββ snakemake.log
βββ trimmed
βββ units.tsv
This issue has been resolved.
tmux was pointing Python to the system version (2.7) and not my conda environment (3.6). Still not sure why tmux points to a different python version as opposed to when I'm detached from a session. Cheers!
No idea, I use tmux all the time. Maybe an issue with your shell configuration?
Starting a tmux session appended a few directories to my path, which was surpassing the conda path. I added the following line to my .tmux.conf to fix: set -g default-command "${SHELL}"