The get_average_volume_from_database method returns ZeroDivisionError: division by zero when the composition is not found in the lookup table.
if (avg_vol := get_entry_from_dict(chem_env_key)) is not None:
vols.append(avg_vol["avg_vol"] * avg_vol["count"])
counts += avg_vol["count"]
This is because there is no fall back method when the composition isn't found and the counts and vol are both zero. A default would be using something like the Vegard's law where the volumes can be obtained with the single element structures.
Error when using the Composition("Ag50 Nb50"):
get_average_volume_from_database
return sum(vols) / counts
~~~~~~~~~~^~~~~~~~
ZeroDivisionError: division by zero