papermerge-core icon indicating copy to clipboard operation
papermerge-core copied to clipboard

Import over papermerge-cli not working

Open Kingside88 opened this issue 1 year ago • 3 comments

Hi, Thank you for providing such a great tool. Unfortunately I can't figure out how to import my documents. My documents are sorted in an annual folder structure. And inside each folder there are subfolders as well.

My steps I tried so far:

  1. start power shell with ssh and connect with the docker container: docker exec -it papermerge-worker-1 bash
  2. install Python pip: sudo dnf install python3-pip
  3. install papermerge-cli: pip install papermerge-cli
  4. Login to the UI with my user (admin account does not work), F12 Devtools, network and grap the bearer token.
  5. back in power shell start import: papermerge-cli --host http://nas:12000/api/ --token MYTOKEN import ./mnt/NAS/Dokumente

the folder exists and is mounted but I get the error "no Detail". Can you please provide some help?

Kingside88 avatar Jun 18 '24 18:06 Kingside88

Host should be specified without "/api/" part. In your case --host http://nas:12000/.

where does "no Detail" error comes from ?

ciur avatar Jun 19 '24 17:06 ciur

Thank you. I tried as you suggested without "/api/" part and I got "Internal Server Error" as response. But it imported some files of one of the folders. When I try it again, it says {"detail":"Title already exists"}

Kingside88 avatar Jun 21 '24 22:06 Kingside88

I too have a similar problem. Even if you execute POST /nodes/ using REST API, Title already exists will be returned. Even though there is no node with the same name.

curl --location 'https://my-papermerge-host/api/nodes/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
    "title": "document title",
    "ctype": "document",
    "parent_id": "<user id>"
}'

sskmy1024y avatar Aug 16 '24 01:08 sskmy1024y