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

Error when checking dependencies in mdmcleaner makedb #54

Open
danpal96 opened this issue Apr 12, 2023 · 3 comments
Open

Error when checking dependencies in mdmcleaner makedb #54

danpal96 opened this issue Apr 12, 2023 · 3 comments

Comments

@danpal96
Copy link

Installation with conda:
python=3.11.3
mdmcleaner=0.8.7

I got the next error when running mdmcleaner makedb

You are running the following MDMcleaner command:                                                                                
         '/mnt/extra/home/danielpalma/mambaforge/envs/mdmcleaner/bin/mdmcleaner makedb -o mdmcleaner'                                                                                                                                                             
reading settings from configfile: "/mnt/extra/home/danielpalma/mambaforge/envs/mdmcleaner/lib/python3.11/site-packages/mdmcleaner/mdmcleaner.config"                                                                                                              
                                                                                                                                                                                                                                                                  
        settings:                                                                                                                                                                                                                                                 
                threads = '1'                                                                                                                                                                                                                                     
                db_type = '['gtdb']'                                                                                                                                                                                                                              
                blacklistfile = '['/mnt/extra/home/danielpalma/mambaforge/envs/mdmcleaner/lib/python3.11/site-packages/mdmcleaner/blacklist.list']'                                                                                                               
                blastn = 'blastn'                                                                                                
                blastp = 'blastp'                                                                                                
                makeblastdb = 'makeblastdb'                                                                                                                                                                                                                       
                blastdbcmd = 'blastdbcmd'                                                                                                                                                                                                                         
                diamond = 'diamond'                                                                                                                                                                                                                               
                barrnap = 'barrnap'                                                                                              
                hmmsearch = 'hmmsearch'                                                                                          
                aragorn = 'aragorn'                                                                                              
                prodigal = 'prodigal'                                                                                                                                                                                                                             
                                                                                                                                 
                                                                                                                                 
        checking dependencies...                                                                                                 
                makeblastdb...2.13.0 --> OK!                                                                                     
                diamond...2.1.6 --> OK!                                                                                                                                                                                                                           
                wget...Traceback (most recent call last):                                                                        
  File "/mnt/extra/home/danielpalma/mambaforge/envs/mdmcleaner/bin/mdmcleaner", line 10, in <module>                                                                                                                                                              
    sys.exit(main())                                                                                                             
             ^^^^^^                                                                                                                                                                                                                                               
  File "/mnt/extra/home/danielpalma/mambaforge/envs/mdmcleaner/lib/python3.11/site-packages/mdmcleaner/mdmcleaner.py", line 230, in main
    check_dependencies.check_dependencies("makeblastdb", "diamond", "wget", configs=configs)                                     
  File "/mnt/extra/home/danielpalma/mambaforge/envs/mdmcleaner/lib/python3.11/site-packages/mdmcleaner/check_dependencies.py", line 115, in check_dependencies                                                                                                    
    check_external_dependency(*toolnames, configs=configs)                                                                       
  File "/mnt/extra/home/danielpalma/mambaforge/envs/mdmcleaner/lib/python3.11/site-packages/mdmcleaner/check_dependencies.py", line 128, in check_external_dependency                                                                                             
    isttool = version_object(get_external_dependency_version_string(tool))                                                       
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                         
  File "/mnt/extra/home/danielpalma/mambaforge/envs/mdmcleaner/lib/python3.11/site-packages/mdmcleaner/check_dependencies.py", line 86, in get_external_dependency_version_string
    output = proc.stdout.readline().strip()                                                                                      
             ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                               
  File "/mnt/extra/home/danielpalma/mambaforge/envs/mdmcleaner/lib/python3.11/encodings/ascii.py", line 26, in decode            
    return codecs.ascii_decode(input, self.errors)[0]

For some reason it is decoding the wget --version text as ascii but in my version of wget the text contains some non-ascii characters.

I solved this by replacing the next line of get_external_dependency_version_string:

proc = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, text = True, universal_newlines=True)

with:

proc = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, text = True, universal_newlines=True, errors="ignore")

The errors parameter is explained here https://docs.python.org/3/library/io.html#io.TextIOWrapper. I don't think that setting it to ignore would cause any unexpected behaviour but I'm not sure.

@ysevel
Copy link

ysevel commented Jul 5, 2023

got exactelly the same problem.
but I can't solve it with the same line modification:

checking dependencies...
makeblastdb...2.14.0 --> OK!
diamond...2.1.8 --> OK!
wget...None -->WARNING: Incorrect version or excecutable not detected: wget

ERROR: Not all required dependencies for running MDMcleaner are met

either wget is not detected with the modified script or I get the same error regarding ascii character if I don't:

File "/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/bin/mdmcleaner", line 10, in
sys.exit(main())
File "/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib/python3.7/site-packages/mdmcleaner/mdmcleaner.py", line 230, in main
check_dependencies.check_dependencies("makeblastdb", "diamond", "wget", configs=configs)
File "/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib/python3.7/site-packages/mdmcleaner/check_dependencies.py", line 115, in check_dependencies
check_external_dependency(*toolnames, configs=configs)
File "/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib/python3.7/site-packages/mdmcleaner/check_dependencies.py", line 128, in check_external_dependency
isttool = version_object(get_external_dependency_version_string(tool))
File "/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib/python3.7/site-packages/mdmcleaner/check_dependencies.py", line 86, in get_external_dependency_version_string
output = proc.stdout.readline().strip()
File "/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib/python3.7/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 8: ordinal not in range(128)

@jvollme
Copy link
Collaborator

jvollme commented Jul 5, 2023

@ysevel: could you post the output of the following commands:

  • which wget
  • wget --version

So I can see exactly how the version string is formatted?

@ysevel
Copy link

ysevel commented Jul 5, 2023

which wget give "/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/bin/wget"

and wget --version gives: (and I think this is the problem...)

NU Wget 1.20.3 compilé sur linux-gnu.

-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls
+ntlm +opie -psl +ssl/openssl

Wgetrc :
/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/etc/wgetrc (système)
Paramètres régionaux :
/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/share/locale
Compilation :
/home/conda/feedstock_root/build_artifacts/wget_1632718669889/_build_env/bin/x86_64-conda-linux-gnu-cc
-DHAVE_CONFIG_H
-DSYSTEM_WGETRC="/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/etc/wgetrc"
-DLOCALEDIR="/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/share/locale"
-I. -I../lib -I../lib -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem
/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/include
-I/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/include
-I/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/include
-DHAVE_LIBSSL
-I/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/include
-DNDEBUG -march=nocona -mtune=haswell -ftree-vectorize -fPIC
-fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe
-isystem
/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/include
-fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/wget_1632718669889/work=/usr/local/src/conda/wget-1.20.3
-fdebug-prefix-map=/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner=/usr/local/src/conda-prefix
Lien :
/home/conda/feedstock_root/build_artifacts/wget_1632718669889/_build_env/bin/x86_64-conda-linux-gnu-cc
-I/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/include
-DHAVE_LIBSSL
-I/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/include
-DNDEBUG -march=nocona -mtune=haswell -ftree-vectorize -fPIC
-fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe
-isystem
/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/include
-fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/wget_1632718669889/work=/usr/local/src/conda/wget-1.20.3
-fdebug-prefix-map=/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner=/usr/local/src/conda-prefix
-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
-Wl,--disable-new-dtags -Wl,--gc-sections
-Wl,-rpath,/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib
-Wl,-rpath-link,/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib
-L/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib
-lidn2
-L/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib
-lssl -lcrypto
-L/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib
-lz ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a -lrt -lcrypto
/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib/libunistring.so
-Wl,-rpath
-Wl,/home/genouest/cnrs_umr6553/ysevellec/.conda/envs/mdmcleaner/lib

Copyright © 2015 Free Software Foundation, Inc.
Licence GPLv3+ : GNU GPL version 3 ou ultérieure
http://www.gnu.org/licenses/gpl.html.
Logiciel libre : vous êtes libre de le modifier ou de le redistribuer.
Il n’y a AUCUNE GARANTIE, dans les limites permises par la loi.

Écrit initialement par Hrvoje Nikšić hniksic@xemacs.org.
Veuillez signaler toutes anomalies ou demandes à bug-wget@gnu.org.

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

3 participants