mp数据库接口调用错误

文章讨论了在使用MP_API时遇到的403错误,原因是使用了过时的API端点。解决方法是更新mp-api到0.37.5版本和pymatgen到2023.10.11版,以获取最新文档和功能支持。
摘要由CSDN通过智能技术生成

1. mp_api.core.client.MPRestError接口调用错误描述

mp_api.core.client.MPRestError: REST query returned with error status code 403 on URL https://api.materialsproject.org/summary/?criteria=task_id&all_fields=True&limit=1000 with message:
Response {"error": "You are using deprecated API endpoints. Please read our documentation (https://docs.materialsproject.org) and upgrade to the latest version of the mp-api client (https://pypi.org/project/mp-api/).", "version": "blocked"}

2. 解决方式

更新 mp-api==0.37.5pymatgen==2023.10.11

pip install mp-api==0.37.5
pip install pymatgen==2023.10.11
  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值