Skip to content

Problem with the Pourbaix diagram #27

@Dbugf

Description

@Dbugf

Hello, I am trying to use the example of the Pourbaix diagram generator, and I encounter an error when trying to get the entries for the system:
entries = a.get_entries_in_chemsys(['Fe', 'O', 'H'])

Is there any way I can solve this?

MPRestError                               Traceback (most recent call last)
<ipython-input-16-83bed31b90c0> in <module>
      1 #Entries are the basic unit for thermodynamic and other analyses in pymatgen.
      2 #This gets all entries belonging to the Fe-O-H system.
----> 3 entries = a.get_entries_in_chemsys(['Fe', 'O', 'H'])

/usr/local/lib/python3.8/dist-packages/mp_api/client/mprester.py in get_entries_in_chemsys(self, elements, use_gibbs, compatible_only, inc_structure, property_data, conventional_unit_cell, additional_criteria)
    943 
    944         entries.extend(
--> 945             self.get_entries(
    946                 all_chemsyses,
    947                 compatible_only=compatible_only,

/usr/local/lib/python3.8/dist-packages/mp_api/client/mprester.py in get_entries(self, chemsys_formula_mpids, compatible_only, inc_structure, property_data, conventional_unit_cell, sort_by_e_above_hull, additional_criteria)
    527             )
    528         else:
--> 529             docs = self.thermo.search(
    530                 **input_params,
    531                 all_fields=False,

/usr/local/lib/python3.8/dist-packages/mp_api/client/routes/thermo.py in search(self, chemsys, energy_above_hull, equilibrium_reaction_energy, formation_energy, formula, is_stable, material_ids, num_elements, thermo_ids, thermo_types, total_energy, uncorrected_energy, sort_fields, num_chunks, chunk_size, all_fields, fields)
    142         query_params = {entry: query_params[entry] for entry in query_params if query_params[entry] is not None}
    143 
--> 144         return super()._search(
    145             num_chunks=num_chunks,
    146             chunk_size=chunk_size,

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _search(self, num_chunks, chunk_size, all_fields, fields, **kwargs)
    907         # documented kwargs.
    908 
--> 909         return self._get_all_documents(
    910             kwargs,
    911             all_fields=all_fields,

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _get_all_documents(self, query_params, all_fields, fields, chunk_size, num_chunks)
    956         chosen_param = list_entries[0][0] if len(list_entries) > 0 else None
    957 
--> 958         results = self._query_resource(
    959             query_params,
    960             fields=fields,

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _query_resource(self, criteria, fields, suburl, use_document_model, parallel_param, num_chunks, chunk_size, timeout)
    293                     url += "/"
    294 
--> 295             data = self._submit_requests(
    296                 url=url,
    297                 criteria=criteria,

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _submit_requests(self, url, criteria, use_document_model, parallel_param, num_chunks, chunk_size, timeout)
    427         initial_params_list = [{"url": url, "verify": True, "params": copy(crit)} for crit in new_criteria]
    428 
--> 429         initial_data_tuples = self._multi_thread(use_document_model, initial_params_list)
    430 
    431         for data, subtotal, crit_ind in initial_data_tuples:

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _multi_thread(self, use_document_model, params_list, progress_bar, timeout)
    632                 for future in finished:
    633 
--> 634                     data, subtotal = future.result()
    635 
    636                     if progress_bar is not None:

/usr/lib/python3.8/concurrent/futures/_base.py in result(self, timeout)
    435                     raise CancelledError()
    436                 elif self._state == FINISHED:
--> 437                     return self.__get_result()
    438 
    439                 self._condition.wait(timeout)

/usr/lib/python3.8/concurrent/futures/_base.py in __get_result(self)
    387         if self._exception:
    388             try:
--> 389                 raise self._exception
    390             finally:
    391                 # Break a reference cycle with the exception in self._exception

/usr/lib/python3.8/concurrent/futures/thread.py in run(self)
     55 
     56         try:
---> 57             result = self.fn(*self.args, **self.kwargs)
     58         except BaseException as exc:
     59             self.future.set_exception(exc)

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _submit_request_and_process(self, url, verify, params, use_document_model, timeout)
    720                     message = str(data)
    721 
--> 722             raise MPRestError(
    723                 f"REST query returned with error status code {response.status_code} "
    724                 f"on URL {response.url} with message:\n{message}"

MPRestError: REST query returned with error status code 404 on URL https://api.materialsproject.org/thermo/?thermo_types=GGA_GGA%2BU&_fields=entries&chemsys=Fe&_limit=143 with message:
Response {"message":"no Route matched with those values"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions