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

ValueError in pyani plot using pyani 0.3.0-alpha #418

Open
jmoltzau opened this issue Jun 17, 2023 · 0 comments
Open

ValueError in pyani plot using pyani 0.3.0-alpha #418

jmoltzau opened this issue Jun 17, 2023 · 0 comments

Comments

@jmoltzau
Copy link

jmoltzau commented Jun 17, 2023

Summary:

I installed pyani 0.3.0-alpha and python 3.9.16 in a conda environment and was working through the 'walkthrough: a first analysis', but I'm getting an error when running pyani plot.
ValueError: Invalid file path or buffer object type: <class 'NoneType'>

Description:

Created a conda environment where I installed pyani 0.3.0-alpha and python 3.9.16 Was working through the 'walkthrough: a first analysis' (https://github.com/widdowquinn/pyani/blob/master/README.md) to get a sense of it. Initially had some trouble running pyani anim and pyani report, but solved it by reading up on issue #413 . Currently getting an error when running pyani plot. Thought maybe it has something to do with pandas IO tools, but not sure how to solve it. Would appreciate any help.

Reproducible Steps:

pyani plot -o C_blochmannia_ANIm --run_id 1 -v --formats png

[INFO] [pyani.scripts.pyani_script]: Processed arguments: Namespace(version=False, citation=False, logfile=None, verbose=True, debug=False, disable_tqdm=False, outdir=PosixPath('C_blochmannia_ANIm'), run_ids=['1'], dbpath=PosixPath('.pyani/pyanidb'), formats=['pdf'], method='seaborn', workers=None, func=<function subcmd_plot at 0x7f9d6c541790>)
[INFO] [pyani.scripts.pyani_script]: Checking for database file: .pyani/pyanidb
[INFO] [pyani.scripts.subcommands.subcmd_plot]: Generating graphical output for analyses
[INFO] [pyani.scripts.subcommands.subcmd_plot]: Writing output to: C_blochmannia_ANIm
[INFO] [pyani.scripts.subcommands.subcmd_plot]: Rendering method: seaborn
Traceback (most recent call last):
File "/user/miniconda3/envs/pyani_master/bin/pyani", line 8, in
sys.exit(run_main())
File "/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages/pyani/scripts/pyani_script.py", line 143, in run_main
returnval = args.func(args)
File "/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages/pyani/scripts/subcommands/subcmd_plot.py", line 95, in subcmd_plot
write_run_plots(run_id, session, outfmts, args)
File "/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages/pyani/scripts/subcommands/subcmd_plot.py", line 131, in write_run_plots
("identity", pd.read_json(results.df_identity), {}),
File "/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages/pandas/io/json/_json.py", line 760, in read_json
json_reader = JsonReader(
File "/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages/pandas/io/json/_json.py", line 861, in init
data = self._get_data_from_filepath(filepath_or_buffer)
File "/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages/pandas/io/json/_json.py", line 901, in _get_data_from_filepath
self.handles = get_handle(
File "/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages/pandas/io/common.py", line 716, in get_handle
ioargs = _get_filepath_or_buffer(
File "/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages/pandas/io/common.py", line 456, in _get_filepath_or_buffer
raise ValueError(msg)
ValueError: Invalid file path or buffer object type: <class 'NoneType'>

Current Output:

Also tried with --method mpl, but get the same error as seen above

Expected Output:

Was expecting to generate heatmaps.

pyani Version:

pyani 0.3.0-alpha

installed dependencies

System information
Platorm==Linux-3.10.0-1160.90.1.el7.x86_64-x86_64-with-glibc2.17
Python==3.9.16
[GCC 11.2.0]
Installed pyani Python dependendencies...
Pillow==9.5.0 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
biopython==1.78 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
matplotlib==3.7.1 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
namedlist==1.8 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
networkx==2.8.4 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
numpy==1.24.3 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
openpyxl==3.0.10 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
pandas==1.5.3 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
scipy==1.10.1 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
seaborn==0.12.2 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
sqlalchemy==1.3.0 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
tqdm==4.65.0 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
Installed pyani development dependendencies...
bandit==Not Installed (-)
black==Not Installed (-)
codecov==Not Installed (-)
coverage==Not Installed (-)
doc8==Not Installed (-)
flake8==Not Installed (-)
jinja2==3.1.2 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
mypy==0.981 (/user/miniconda3/envs/pyani_master/lib/python3.9/site-packages)
pydocstyle==Not Installed (-)
pylint==Not Installed (-)
pytest==Not Installed (-)
pytest-cov==Not Installed (-)
sphinx==Not Installed (-)
Installed pyani pip-install dependendencies...
pre-commit==Not Installed (-)
pytest-ordering==Not Installed (-)
sphinx-rtd-theme==Not Installed (-)
Installed third-party tool versions...
blast+==Linux_2.5.0+ (/user/miniconda3/envs/pyani_master/bin/blastn)
nucmer==Linux_3.1 (/user/miniconda3/envs/pyani_master/bin/nucmer)
blastall==blastall is not found in $PATH
fastani==fastANI is not found in $PATH

Python Version:

python 3.9.16

Operating System:

macOS

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

1 participant