It looks like there is a bug with the 3D (4 component) phase diagram plots. The plots do not display
Thanks for reporting this, @flac_tph!
This is the error response I notice in my browser console when trying to load a 4-component plot:
{
"valid_response": false,
"error": "'Figure' object has no attribute 'gcf'",
"version": {
"db": "2021_05_13",
"pymatgen": "2022.0.8",
"rest": "2.0"
},
"created_at": "2021-06-11T06:44:43.150720",
"traceback": "Traceback (most recent call last):\n File \"/var/www/python/matgen_prod/materials_django/rest/rest.py\", line 95, in wrapped\n d = func(*args, **kwargs)\n File \"/var/www/python/matgen_prod/materials_django/phase_diagram/rest.py\", line 129, in get_phase_diagram_image\n return {\"response\": app.image(\"png\"), \"valid_reponse\": True, \"mimetype\":\n File \"/var/www/python/matgen_prod/pymatpro/pymatpro/apps/db_apps.py\", line 356, in image\n plotter.write_image(s, image_format)\n File \"/opt/miniconda3/envs/mpprod3/lib/python3.8/site-packages/pymatgen/analysis/phase_diagram.py\", line 2110, in write_image\n f = plt.gcf()\nAttributeError: 'Figure' object has no attribute 'gcf'\n"
}
screenshot for text wrapping:
So, it looks like a recent update to a python plotting package dependency removed an expected object attribute, and MP’s back-end code needs to be updated to reflect this change. @mkhorton?