我完成了本教程中的每个步骤,并获得了所有必需的信息/ID/参数。还看了这些视频。
但是,在运行示例 python 代码(flask 应用程序)并在浏览器中打开 localhost url 的最后阶段,我收到此错误:
Error Details:
401 Unauthorized: Error while retrieving Embed URL
Unauthorized:
RequestId: 0b143776-bc54-492e-80bc-5401ecf32fd3
Run Code Online (Sandbox Code Playgroud)
我不明白为什么
pbiembedservice.py看来我无法获取令牌,并且 401作为 api 响应返回(最后一行):
class PbiEmbedService:
def get_embed_params_for_single_report(self, workspace_id, report_id, additional_dataset_id=None):
'''Get embed params for a report and a workspace
Args:
workspace_id (str): Workspace Id
report_id (str): Report Id
additional_dataset_id (str, optional): Dataset Id different than the one bound to the report. Defaults to None.
Returns:
EmbedConfig: Embed token and Embed …Run Code Online (Sandbox Code Playgroud)