CheckM2 icon indicating copy to clipboard operation
CheckM2 copied to clipboard

Saved models could not be loaded: 'str' object has no attribute 'decode'

Open xinehc opened this issue 1 year ago • 5 comments

The installed checkm2 v1.0.1 returns an error saying that the model could not be loaded. testrun seems not working. Manual installation with checkm2 v1.0.2 by git clone and python setup install also has this problem.

mamba create -n checkm2 -c bioconda -c conda-forge checkm2
checkm2 database --download
checkm2 testrun

[06/01/2023 03:11:36 PM] INFO: Test run: Running quality prediction workflow on test genomes with 1 threads. [06/01/2023 03:11:36 PM] INFO: Running checksum on test genomes. [06/01/2023 03:11:36 PM] INFO: Checksum successful. [06/01/2023 03:11:36 PM] ERROR: Saved models could not be loaded: 'str' object has no attribute 'decode'

It also gives an warning regarding the version of numpy, are they related?

UserWarning: A NumPy version >=1.19.5 and <1.27.0 is required for this version of SciPy (detected version 1.19.2)
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"

xinehc avatar Jun 01 '23 15:06 xinehc

Hi, apologies for the late response. Does installing via conda/mamba fix this issue?

chklovski avatar Oct 03 '23 05:10 chklovski

Hi,

I have the same issue

checkm2/bin/checkm2 predict --database_path /hdd0/susbus/databases/kraken2/pluspfp/CheckM2_database/uniref100.KO.1.dmnd --threads 72 -x fa --input /prj/DECODE/socd/results/bins/metabat_drep/dereplicated_genomes --output-directory metabat_checkm2 --force
[04/30/2024 02:47:22 AM] INFO: Running CheckM2 version 1.0.2
[04/30/2024 02:47:22 AM] INFO: Custom database path provided for predict run. Checking database at /hdd0/susbus/databases/kraken2/pluspfp/CheckM2_database/uniref100.KO.1.dmnd...
[04/30/2024 02:47:30 AM] INFO: Running quality prediction workflow with 72 threads.
[04/30/2024 02:47:37 AM] ERROR: Saved models could not be loaded: 'str' object has no attribute 'decode'

It was installed via conda and also tried the stand-alone version.

susheelbhanu avatar Apr 30 '24 01:04 susheelbhanu

Hi,

I am running into the same error as well. I downloaded checkm2 v1.0.1 and its databases using conda. But, I am running into an error

checkm2 predict --input MAGs/bins --output-directory checkm2 --threads 32 --force --database_path databases/checkm2/CheckM2_database/uniref100.KO.1.dmnd

[05/14/2024 03:49:06 PM] INFO: Running CheckM2 version 1.0.1 [05/14/2024 03:49:06 PM] INFO: Custom database path provided for predict run. Checking database at databases/checkm2/CheckM2_database/uniref100.KO.1.dmnd... [05/14/2024 03:49:24 PM] INFO: Running quality prediction workflow with 32 threads. [05/14/2024 03:49:26 PM] ERROR: Saved models could not be loaded: 'str' object has no attribute 'decode' [Tue May 14 15:49:26 2024]

npbhavya avatar May 14 '24 06:05 npbhavya

Hi @chklovski,

Just wondering if there's any update on this. Still running into this.

Thank you!

susheelbhanu avatar Jun 01 '24 22:06 susheelbhanu

hello I am having the same issue

TomasaSbaffi avatar Jun 21 '24 17:06 TomasaSbaffi

currently I am having the same issue after updating from checkm 1.01 (which was instaleld from source) to v1.02. regardless of whether installing via conda or mamba or pip or installing from source.

jvollme avatar Oct 11 '24 12:10 jvollme