Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: the JSON object must be str, not 'bytes' #1

Closed
huangk3 opened this issue Aug 10, 2021 · 4 comments
Closed

TypeError: the JSON object must be str, not 'bytes' #1

huangk3 opened this issue Aug 10, 2021 · 4 comments

Comments

@huangk3
Copy link

huangk3 commented Aug 10, 2021

Hi @dcroote ,

I was trying to run the pipeline on my Mac, and ran into an error. I wondered if there is any clue about this error. Thanks!

% snakemake --use-conda --cores 4
Multiple include of /Users/kh/Softwares/singlecell-ige/rules/common.smk ignored
Building DAG of jobs...
Traceback (most recent call last):
File "/Users/kh/Softwares/mambaforge/envs/IgE_snakemake/lib/python3.5/site-packages/snakemake/init.py", line 647, in snakemake
keepincomplete=keep_incomplete,
File "/Users/kh/Softwares/mambaforge/envs/IgE_snakemake/lib/python3.5/site-packages/snakemake/workflow.py", line 777, in execute
quiet=list_conda_envs,
File "/Users/kh/Softwares/mambaforge/envs/IgE_snakemake/lib/python3.5/site-packages/snakemake/dag.py", line 260, in create_conda_envs
env.create(dryrun)
File "/Users/kh/Softwares/mambaforge/envs/IgE_snakemake/lib/python3.5/site-packages/snakemake/deployment/conda.py", line 232, in create
conda = Conda(self._container_img)
File "/Users/kh/Softwares/mambaforge/envs/IgE_snakemake/lib/python3.5/site-packages/snakemake/deployment/conda.py", line 343, in new
inst.init(container_img=container_img)
File "/Users/kh/Softwares/mambaforge/envs/IgE_snakemake/lib/python3.5/site-packages/snakemake/deployment/conda.py", line 357, in init
self.info = json.loads(shell.check_output(self._get_cmd("conda info --json")))
File "/Users/kh/Softwares/mambaforge/envs/IgE_snakemake/lib/python3.5/json/init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'bytes'

@dcroote
Copy link
Owner

dcroote commented Aug 14, 2021

Hi @huangk3 - I think it may have to do with the snakemake version. Can you provide the output of the following:

snakemake --version
conda --version

@huangk3
Copy link
Author

huangk3 commented Aug 14, 2021

Thanks for the response @dcroote. Here is the version info:

% snakemake --version
5.11.1
% conda --version
conda 4.10.3

@dcroote
Copy link
Owner

dcroote commented Aug 14, 2021

Thanks @huangk3, I was able to reproduce your error with snakemake 5.11.1. Can you please downgrade to snakemake 5.2.4? If you created the conda env via the instructions in the readme, you should be able to do this via conda remove -y snakemake-minimal && conda install -y snakemake-minimal=5.2.4.

@huangk3
Copy link
Author

huangk3 commented Aug 14, 2021

The error is gone after installed snakemake v5.2.4. Thanks for the help! @dcroote

@huangk3 huangk3 closed this as completed Aug 14, 2021
dcroote added a commit that referenced this issue Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants