Skip to content

[Bug]: Retrieving "entry" for tasks no longer works #1017

@tawe141

Description

@tawe141

Code snippet

with MPRester() as mpr:
    task_id = 'mp-19970'
    task_doc = mpr.materials.tasks.search([task_id], fields=['task_id', 'calcs_reversed', 'elements', 'entry'])[0]
    print(task_doc.entry)

What happened?

I'm attempting to retrieve the entries in TaskDocs, and I've been including 'entry' in the fields requested. However, the error below, stating that 'entry' is not part of the document, occurs when I run the above snippet. Despite including this in fields, the resulting document has 'entry' in fields_not_requested. Strangely, this was working even without including 'entry' explicitly in fields last week. Has something changed with the API?

Version

0.45.12

Which OS?

  • MacOS
  • Windows
  • Linux

Log output

AttributeError: 'entry' data is available but has not been requested in 'fields'. A full list of unrequested fields can be found in `fields_not_requested`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions