Best way to get large amount of pourbaix entries

Hi there,

I wanted to screen a large volume of materials for water stability however I am running into some issues with calling the api several times, maybe someone can suggest a better way for me to go about this?

my basic method right now is:

get material entries of stable materials → extract chemsys → get pourbaix entries of the chemsys list

however when I try to loop over the get_pourbaix_entries, the api call gets randomly stuck, usually somewhere between the 5th-50th call, on some of the calls i get this truncated output:

spglib: ssm_get_exact_positions failed (attempt=4). (line 115, /tmp/pip-install-58cw25xt/spglib_6207849ab7c64022b27925c813b8e5ef/src/site_symmetry.c).
spglib: ssm_get_exact_positions failed. (line 479, /tmp/pip-install-58cw25xt/spglib_6207849ab7c64022b27925c813b8e5ef/src/refinement.c).
spglib: get_bravais_exact_positions_and_lattice failed. (line 336, /tmp/pip-install-58cw25xt/spglib_6207849ab7c64022b27925c813b8e5ef/src/refinement.c).
spglib: ref_get_exact_structure_and_symmetry failed. (line 82, /tmp/pip-install-58cw25xt/spglib_6207849ab7c64022b27925c813b8e5ef/src/determination.c).

Its seems generally proceed to the next list element, however i have noticed when it finally does get stuck its on that output. This is my code that I am running:

with MPRester(API_KEY) as mpr:
    count = 0  
    for i, x in zip(chemsys_list, percent_compositions):
        count += 1 
        try:
            pourbaix_entries = mpr.get_pourbaix_entries(i)
            pbx_entries.append(pourbaix_entries)
            pbx_diagram = PourbaixDiagram(entries=pourbaix_entries, comp_dict=x)
            pbx_data.append(pbx_diagram)
            time.sleep(15)
        except Exception as e:
            pbx_data.append('error')
        finally:
            percentage_complete = (count / total_iterations) * 100  
            print(f"Percentage complete: {percentage_complete:.2f}%")  

Thanks for the help