首页 > 解决方案 > Athenahealth 沙盒 - 没有名为“athenahealthapi”的模块

问题描述

我正在尝试在 athenahealth 上玩沙箱 - https://docs.athenahealth.com/api/guides/explore-and-prototype - 注册和创建应用程序后,我开始使用沙箱 -试试 sandbox。我滚动到示例代码,转到 GH >> samplecode >> python3 >> testing.py。拉动并运行此代码时,我不断收到错误

ModuleNotFoundError:没有名为“athenahealthapi”的模块

我无法安装 athenahealthapi

标签: python-3.xinstallationpip

解决方案


如果您正在查看 API 代码示例,您应该会看到一个具有称为 APIConnection 的类连接的示例。我相信您需要将该代码保存为一个名为 athenahealthapi.py 的文件,该文件与您运行脚本的文件夹相同。这本质上是 athenahealthapi 模块,它将 APIConnection 类拉为 athenahealthapi.APIConnection()。我已经通过了那部分,但现在遇到了缺少 access_token 密钥错误的问题。:(


推荐阅读