MPRestError: 'str' object has no attribute 'entry_id'

I am facing an error when trying to fetch the DB via MPRester: my code

import pymatgen.core as mg
from pymatgen.ext.matproj import MPRester
si = mg.Element('Si')
with MPRester('MY_API_KEY') as mpr:
    str = mpr.get_stability('mp-1086')

returns the following error:

File "path_to_file", line 10, in <module>
    str = mpr.get_stability('mp-1086')
  File "C:\Users\anton\anaconda3\lib\site-packages\pymatgen\ext\", line 1314, in get_stability
    raise MPRestError(str(ex))
pymatgen.ext.matproj.MPRestError: 'str' object has no attribute 'entry_id'

Both pymatgen.core and pymatgen.ext.matproj seem to be imported correctly: am I formatting the request wrong or why do you think the error is raised?

the get_stability method takes a list of ComputedEntries as an argument, I believe. You could try getting the entries first with get_entries(), but it might work better to use
mpr.get_data(‘mp-1086’, prop=‘e_above_hull’)
or something similar