我在Metabase中的数据库中有数据,而不是通过API提取的数据
https://www.metabase.com/learn/administration/metabase-api
根据建议,我正在使用下面的代码访问它:
import requests
import pandas as pd
response = requests.post('http://localhost:3000/api/session',
json={'username': '*********',
'password': '*******'})
session_id = response.json()['id']
headers = {'X-Metabase-Session': session_id}
但是,我无法通过localhost获取错误
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
及
HTTPConnectionPool(host='localhost', port=3000): Max retries exceeded with url: /api/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002310642FE80>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
我如何解决这个问题
目前没有回答
相关问题 更多 >
编程相关推荐