requests.exceptions.SSLError: HTTPSConnectionPool(host=‘cloud.seatable.cn’, port=443): Max retries exceeded with url: /api-gateway/api/v2/dtables/18c360ee-780c-4129-8434-6c809fde955c/rows/ (Caused by SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:2426)’)))
以前一直没问题,程序调用base.batch_append_rows(table_name, chunk)
创建一个新表,做了简单测试,发现写入数据为空
from seatable_api import Base
from dotenv import load_dotenv
import os
load_dotenv()
SEATABLE_SERVER_URL = os.getenv(‘SEATABLE_SERVER_URL’)
SEATABLE_API_TOKEN = os.getenv(‘SEATABLE_API_TOKEN’)
TABLE_NAME = ‘Test’
def setup_base():
“”“初始化并认证 Base 对象”“”
base = Base(SEATABLE_API_TOKEN, SEATABLE_SERVER_URL)
base.auth()
return base
def test_append_row(base):
“”“测试插入单条数据”“”
row = {
‘合同编号’: ‘2024001’,
‘项目名称’: ‘项目A’
}
print(“Testing append_row…”)
base.append_row(TABLE_NAME, row)
print(“Single row inserted successfully.”)
def test_batch_append_rows(base):
“”“测试批量插入数据”“”
rows = [
{
‘合同编号’: ‘2024002’,
‘项目名称’: ‘项目B’
},
{
‘合同编号’: ‘2024003’,
‘项目名称’: ‘项目C’
}
]
print(“Testing batch_append_rows…”)
base.batch_append_rows(TABLE_NAME, rows)
print(“Multiple rows inserted successfully.”)
if name == ‘main’:
base = setup_base()
test_append_row(base)
test_batch_append_rows(base)