Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import over papermerge-cli not working #379

Open
Kingside88 opened this issue Jun 18, 2024 · 3 comments
Open

Import over papermerge-cli not working #379

Kingside88 opened this issue Jun 18, 2024 · 3 comments

Comments

@Kingside88
Copy link

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?

@ciur
Copy link
Member

ciur commented Jun 19, 2024

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

where does "no Detail" error comes from ?

@Kingside88
Copy link
Author

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"}

@sskmy1024y
Copy link

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>"
}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants