Pmg_analyze error

I’m getting the error below when utilizing the pmg_analyze function.
Neither the string ‘energy_per_atom’ nor ‘delta_vol’ used in the pmg_analyze.py script appear anywhere in the output files being analyzed so I’m not sure why those tags are being used.
All derivatives of the Vasprun.converged methods return true.
e.data[“delta_volume”] is None seems to be causing the error.

/home/darnoc/anaconda3/envs/pymatgen/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
** return f(args, kwds)
/home/darnoc/anaconda3/envs/pymatgen/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
** return f(args, kwds)
Traceback (most recent call last):
** File “/home/darnoc/anaconda3/envs/pymatgen/bin/pmg”, line 11, in

** sys.exit(main())**
** File “/home/darnoc/anaconda3/envs/pymatgen/lib/python3.6/site-packages/pymatgen/cli/pmg.py”, line 294, in main**
** args.func(args)**
** File “/home/darnoc/anaconda3/envs/pymatgen/lib/python3.6/site-packages/pymatgen/cli/pmg_analyze.py”, line 133, in analyze**
** args.detailed, args.sort, args.format)**
** File “/home/darnoc/anaconda3/envs/pymatgen/lib/python3.6/site-packages/pymatgen/cli/pmg_analyze.py”, line 73, in get_energies**
** delta_vol = “{:.2f}”.format(e.data[“delta_volume”] * 100)**
*TypeError: unsupported operand type(s) for : ‘NoneType’ and ‘int’

Hi Conrad, can you provide us with one of the output files you’re analyzing so we can try to reproduce the error?

Is there a way to attach files on this platform?
I do not want to post the entire file due to its length and format.

There is not. You can upload somewhere and post a link here. Pastebin is good for text content < 0.5 MB.

The file is too large for pastebin’s free edition.
Here is a link to google drive upload.
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!forum/pycdt-forum

Hi Conrad, can you upload the whole vasp directory? pmg analyze -d, which only looks at the vasprun, is working for me, but the “non-detailed” default mode of pmg analyze uses some of the more lightweight files. Also can you specify your pymatgen version?

Here is a link to the directory.
https://drive.google.com/drive/folders/1u65pQ0O5JwvKskVLa5u9me-E2YM14QEO?usp=sharing

I was not aware that special tags/optional arguments may be utilized with the pmg analyze command.
However, the help function output, as seen below, does not clearly detail the functionality of each argument.

usage: pmg analyze [-h] [-e] [-m ION_LIST] [-r]
[-f {fancy_grid,github,grid,html,jira,latex,latex_booktabs,latex_raw,mediawiki,moinmoin,orgtbl,pipe,plain,prest****o,psql,rst,simple,textile,tsv,youtrack}]
[-v] [-d] [-s {energy_per_atom,filename}]
[dir [dir …]]

Hi Conrad, I’m really not sure what’s going on. The output of my pmg analyze --help has details on each output function. Can you specify your pymatgen and python version?

usage: pmg analyze [-h] [-e] [-m ION_LIST] [-r]
                   [-f {fancy_grid,github,grid,html,jira,latex,latex_booktabs,latex_raw,mediawiki,moinmoin,orgtbl,pipe,plain,presto,psql,rst,simple,textile,tsv,youtrack}]
                   [-v] [-d] [-s {energy_per_atom,filename}]
                   [dir [dir ...]]

positional arguments:
  dir                   directory to process (default to .)

optional arguments:
  -h, --help            show this help message and exit
  -e, --energies        Print energies
  -m ION_LIST, --mag ION_LIST
                        Print magmoms. ION LIST can be a range (e.g., 1-2) or
                        the string 'All' for all ions.
  -r, --reanalyze       Force reanalysis. Typically, vasp_analyzer will just
                        reuse a vasp_analyzer_data.gz if present. This forces
                        the analyzer to reanalyze the data.
  -f {fancy_grid,github,grid,html,jira,latex,latex_booktabs,latex_raw,mediawiki,moinmoin,orgtbl,pipe,plain,presto,psql,rst,simple,textile,tsv,youtrack}, --format {fancy_grid,github,grid,html,jira,latex,latex_booktabs,latex_raw,mediawiki,moinmoin,orgtbl,pipe,plain,presto,psql,rst,simple,textile,tsv,youtrack}
                        Format for table. Supports all options in tabulate
                        package.
  -v, --verbose         Verbose mode. Provides detailed output on progress.
  -d, --detailed        Detailed, but slower mode. Parses vasprun.xml instead
                        of separate vasp outputs.
  -s {energy_per_atom,filename}, --sort {energy_per_atom,filename}
                        Sort criteria. Defaults to energy / atom.

Also, just FYI, you might want to post pymatgen-specific questions on the pymatgen forum, since that forum is more focused on maintaining pymatgen (as opposed to this one which is more focused on the Materials Project API and website). We’re happy to help you here, of course, but they might be better suited to help.

Actually, the analyze - h command instead of -help yielded the verbose details as you posted.

Python 3.7.2
Name: pymatgen
Version: 2019.3.13