arzwa / wgd

Python package and CLI for whole-genome duplication related analyses. This package is deprecated in favor of https://github.com/heche-psb/wgd.
http://wgd.readthedocs.io/en/latest/
GNU General Public License v3.0
81 stars 41 forks source link

NameError: global name 'FileNotFoundError' is not defined #7

Closed claudiacln87 closed 5 years ago

claudiacln87 commented 5 years ago

Hi I am trying to run All-versus-all Blastp analysis and MCL clustering but I got this error. Any suggestions?

File "/rhome/ccoleine/.conda/envs/MIC-test/lib/python2.7/site-packages/wgd_cli.py", line 293, in mcl
    inflation_factor, eval_cutoff, output_dir, n_threads)
  File "/rhome/ccoleine/.conda/envs/MIC-test/lib/python2.7/site-packages/wgd_cli.py", line 334, in blast_mcl
    if can_i_run_software(software) == 1:
  File "/rhome/ccoleine/.conda/envs/MIC-test/lib/python2.7/site-packages/wgd/utils.py", line 67, in can_i_run_software
    except FileNotFoundError:
NameError: global name 'FileNotFoundError' is not defined
arzwa commented 5 years ago

Hi,

It seems you are using python2.7. You will need to use either python3.5 or python3.6 to be able to use wgd. I would suggest to create a new conda environment or virtualenv with one of the python3 versions as main python version and try again.

Best, Arthur

claudiacln87 commented 5 years ago

Just tried and got this other error:

  File "/rhome/ccoleine/.conda/envs/MIC-python3/bin/wgd", line 11, in <module>
    sys.exit(cli())
  File "/rhome/ccoleine/.conda/envs/MIC-python3/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/rhome/ccoleine/.conda/envs/MIC-python3/lib/python3.6/site-packages/click/core.py", line 696, in main
    _verify_python3_env()
  File "/rhome/ccoleine/.conda/envs/MIC-python3/lib/python3.6/site-packages/click/_unicodefun.py", line 124, in _verify_python3_env
    ' mitigation steps.' + extra
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.
arzwa commented 5 years ago

Hi,

I haven't had problems with click in Python 3 before, it seems to be an issue with Unicode stuff in your environment. Based on what I read here, you might be able to make it work by setting a couple of environment variables:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

which are the settings on my machine.

Hope this helps, Arthur

claudiacln87 commented 5 years ago

Great, now it works with settings on US machine a en_US.utf-8. Thank you very much. I will let you know how my analysis proceed. Best regards, Claudia