Access problem: papermerge-cli with casaos docker linuxserver.io
ibLANtest opened this issue · 2 comments
Problem while using papermerge-cli-0.3.3
I run a zima board with debian11 based casaos in my local network for testing. I applied "papermerge app file" from https://appfile.casaos.io/community via casaos custom install. Which worked like a charm! I am able to use the papermerge instance via web UI Port 8000 without any problem.
Then I want to automate .inbox
input, since it is suggested as the preferable solution here.
I tried to run this command in a local network to check out the REST API via papermerge-cli:
~/.local/bin/papermerge-cli --host http://local.domain:8000/ --token TOKEN list
the result is:
Traceback (most recent call last):
File "/home/myuser/.local/lib/python3.10/site-packages/papermerge_cli/utils.py", line 62, in inner
return func(*args, **kwargs)
File "/home/myuser/.local/lib/python3.10/site-packages/papermerge_cli/rest.py", line 192, in perform_list
response = api_instance.users_me_retrieve()
File "/home/myuser/.local/lib/python3.10/site-packages/papermerge_restapi_client/paths/api_users_me_/get.py", line 124, in users_me_retrieve
return self._users_me_retrieve_oapg(
File "/home/myuser/.local/lib/python3.10/site-packages/papermerge_restapi_client/paths/api_users_me_/get.py", line 106, in _users_me_retrieve_oapg
raise exceptions.ApiException(api_response=api_response)
papermerge_restapi_client.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Type': 'text/html', 'X-Frame-Options': 'DENY', 'Content-Length': '179', 'Vary': 'Cookie', 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'same-origin'})
HTTP response body: b'\n<!doctype html>\n<html lang="en">\n<head>\n <title>Not Found</title>\n</head>\n<body>\n <h1>Not Found</h1><p>The requested resource was not found on this server.</p>\n</body>\n</html>\n'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/myuser/.local/bin/papermerge-cli", line 8, in <module>
sys.exit(cli())
File "/home/myuser/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/myuser/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/myuser/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/myuser/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/myuser/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/myuser/.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/myuser/.local/lib/python3.10/site-packages/papermerge_cli/main.py", line 145, in _list
perform_list(
File "/home/myuser/.local/lib/python3.10/site-packages/papermerge_cli/utils.py", line 39, in inner
return func(**kwargs)
File "/home/myuser/.local/lib/python3.10/site-packages/papermerge_cli/utils.py", line 54, in inner
return func(**kwargs)
File "/home/myuser/.local/lib/python3.10/site-packages/papermerge_cli/utils.py", line 72, in inner
raise ApiException from e
papermerge_restapi_client.exceptions.ApiException: (None)
Reason: None
Clearly it is not working?
My Questions
- Do I make an obvious error that I do not see?
- Is it possible that the casaos community docker version does not support the CLI?
I admit i am not that familiar with REST API and just try to drop files in .inbox
for automated processing. It appears to me that dropping via file system "could/could not" be an alternative? Did not find a .inbox
directory in the container to map it to the host. How would the database realize a new file is there? Just thinking.
Thank you in advance for your help!
papermerge-cli works only with Papermerge DMS version >= 2.1.0
What version of Papermerge DMS do you run ?
Thank you for the answer. You are right the docker image I used is Papermerge 2.0
only.