-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Code
# /// script
# dependencies = [
# "trilium-py",
# ]
# ///
from trilium_py.client import ETAPI
server_url = 'http://localhost:8080'
token = '*******'
ea = ETAPI(server_url, token)
res = ea.upload_md_file(
parentNoteId="import-single-md",
file="./sample/something-2.md",
)❯ uv run xx-debug.py
2025-03-15 10:08:09.125 | INFO | trilium_py.client:upload_md_file:951 - /var/home/matt/dev/trilium-py/examples/uv/sample/something-2.mdportion of http://localhost:8080/#root/_hidden/_backendLog:
10:08:09.159 ERROR: post /etapi/create-note threw exception Validation failed on property 'parentNoteId': Note 'import-single-md' does not exist. with stacktrace: Error: Validation failed on property 'parentNoteId': Note 'import-single-md' does not exist.
So first problem is that the script thinks it succeeded but didn't, but the deeper issue is that trilium-py doesn't report that the server complained so we don't know anything until investigating the backend.
Metadata
Metadata
Assignees
Labels
No labels