pymatgen
pymatgen copied to clipboard
Compatibility with older code
Hi,
I've used pymatgen almost 2 years ago and especially the dopant suggestion feature from pymatgen, but pymatgen has been updated some times and my code is not running anymore. I have used this code example (https://matgenb.materialsvirtuallab.org/2018/11/06/Dopant-suggestions-using-Pymatgen.html) and I would like to update it but I had many issues doing so (API errors especially). Could you help me update this code so I can run it ?
Example of error code I encountered : pymatgen.ext.matproj.MPRestError: REST query returned with error status code 403. Content: b'{"valid_response": false, "error": "API_KEY is not supplied.", "version": {"db": "2020_09_08", "pymatgen": "2022.0.8", "rest": "2.0"}, "created_at": "2022-09-07T11:14:04.038449"}'
Note : I did set "API_KEY = "my api key"" as a variable.
I'm using Python 3.7.12 on Windows 10. I hope my issue is clear enough.
Thank you in advance !
Pls upgrade to Python 3.9 and reinstall pymatgen.
Updating Python worked perfectly! Thank you :) Sorry for the inconvenience.