Not able to make data download via the jupyter

I was trying to make data download following the description codes below on jupyter link:

from mp_api.client import MPRester
with MPRester(api_key=" ") as mpr:
tasks_doc = mpr.materials.tasks.search(
[“mp-27381”], # task_id of this calculation
fields=[“task_id”, “orig_inputs”, “calcs_reversed”, “output”, “last_updated”]
)

but I always get error :
AttributeError: ‘MaterialsRester’ object has no attribute ‘tasks’

Anyone could help me out?
Thanks

@Qchao_Q which version of mp-api are you running?


I was trying to use the jupyter linker provide from the website.
on my Mac, the mp-api version is 0.39.5

The python environment running on binder is unfortunately unmaintained. We should probably remove the link to it from the website. Does the code example work on your Mac?

It is working at the moment on my mac, but I have no idea what is the probem. I tried too manythings like conda, pymatgen. Thanks!