dveselov / docsbox Goto Github PK
View Code? Open in Web Editor NEWSelf-hosted document converting service with HTTP API
License: MIT License
Self-hosted document converting service with HTTP API
License: MIT License
There's currently a bug in https://github.com/rq/rq-scheduler caused by a conflicting argument thats breaking docsbox.
I couldn't find the docker images built from this project on Docker Hub. Do you host them elsewhere already or are you still planning to have them available somewhere?
Hi,
we have installed Docsbox with Docker for Windows on Windows 10 pro machine.
We are getting an error
AttributeError: 'int' object has no attribute 'items'
in the docsbox/docsbox/docs/views.py file with the statement
remove_file.schedule(datetime.timedelta(seconds=app.config["ORIGINAL_FILE_TTL"]), tmp_file.name). The trace is as below:
web_1_e8d8e9ca5919 | /usr/local/lib/python3.5/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.rq2 is deprecated, use flask_rq2 instead.
web_1_e8d8e9ca5919 | .format(x=modname), ExtDeprecationWarning
web_1_e8d8e9ca5919 | [2018-11-22 11:03:37,741] ERROR in app: Exception on /api/v2/ [POST]
web_1_e8d8e9ca5919 | Traceback (most recent call last):
web_1_e8d8e9ca5919 | File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1639, in full_dispatch_request
web_1_e8d8e9ca5919 | rv = self.dispatch_request()
web_1_e8d8e9ca5919 | File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1625, in dispatch_request
web_1_e8d8e9ca5919 | return self.view_functionsrule.endpoint
web_1_e8d8e9ca5919 | File "/usr/local/lib/python3.5/dist-packages/flask_restful/init.py", line 477, in wrapper
web_1_e8d8e9ca5919 | resp = resource(*args, **kwargs)
web_1_e8d8e9ca5919 | File "/usr/local/lib/python3.5/dist-packages/flask/views.py", line 84, in view
web_1_e8d8e9ca5919 | return self.dispatch_request(*args, **kwargs)
web_1_e8d8e9ca5919 | File "/usr/local/lib/python3.5/dist-packages/flask_restful/init.py", line 587, in dispatch_request
web_1_e8d8e9ca5919 | resp = meth(*args, **kwargs)
web_1_e8d8e9ca5919 | File "/home/docsbox/docs/views.py", line 50, in post
web_1_e8d8e9ca5919 | remove_file.schedule(datetime.timedelta(600), tmp_file.name)
web_1_e8d8e9ca5919 | File "/usr/local/lib/python3.5/dist-packages/flask_rq2/helpers.py", line 93, in schedule
web_1_e8d8e9ca5919 | queue_name=self.queue_name,
web_1_e8d8e9ca5919 | File "/usr/local/lib/python3.5/dist-packages/rq_scheduler/scheduler.py", line 149, in schedule
web_1_e8d8e9ca5919 | job.id)
web_1_e8d8e9ca5919 | File "/usr/local/lib/python3.5/dist-packages/redis/client.py", line 2263, in zadd
web_1_e8d8e9ca5919 | for pair in iteritems(mapping):
web_1_e8d8e9ca5919 | File "/usr/local/lib/python3.5/dist-packages/redis/_compat.py", line 123, in iteritems
web_1_e8d8e9ca5919 | return iter(x.items())
web_1_e8d8e9ca5919 | AttributeError: 'int' object has no attribute 'items'
Please could you help in resolving the issue.
Thanks.
Can you have kittens.pdf? Right now, when you unzip the archive, the filename is pdf with no extension whatsoever.
Can you please include Let's encrypt companion in the project? It would be very useful.
Hello,
I want to run docsbox without docker, due I cant run it on my server.
Thanks
I have found that tool, the api looks very simple , which I like.
Considering my current requirements it could be a good solution.
I cloned and installed from scratch and have run into known issue with rq.
After solving that by modifying the requirements.txt:
#git+https://github.com/nvie/rq.git#egg=rq
#rq
rq-scheduler==0.7.0
All services are up and running.
But unfortunately no document is successfully processed. Neither my own nor the sample inside that project:
Request:
curl -i -F "file=@docsbox/docs/tests/samples/sample.docx" http://localhost/api/v1/
Response:
HTTP/1.1 100 Continue
HTTP/1.1 400 BAD REQUEST
Server: nginx/1.4.6 (Ubuntu)
Date: Mon, 19 Feb 2018 16:06:21 GMT
Content-Type: application/json
Content-Length: 55
Connection: keep-alive
{"message": "Not supported mimetype: 'inode/x-empty'"}
Looking into container filesystem I use that files seem to be uploaded, but not transformed, and there is no id returned, what I expect.
Is it a known issue, do I something wrong?
Thanks and Kind Regards,
Uli
I tried running this with docker-compose build
and docker-compose up
, but I'm seeing this error message repeated many times. Did I miss creating a configuration file?
web_1 | [2018-01-30 07:55:32 +0000] [1] [INFO] Starting gunicorn 19.6.0
web_1 | [2018-01-30 07:55:32 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
web_1 | [2018-01-30 07:55:32 +0000] [1] [INFO] Using worker: sync
web_1 | [2018-01-30 07:55:32 +0000] [7] [INFO] Booting worker with pid: 7
web_1 | Failed to find application: 'docsbox'
web_1 | [2018-01-30 07:55:32 +0000] [7] [INFO] Worker exiting (pid: 7)
web_1 | [2018-01-30 07:55:32 +0000] [1] [INFO] Shutting down: Master
web_1 | [2018-01-30 07:55:32 +0000] [1] [INFO] Reason: App failed to load.
rqworker_1 | Traceback (most recent call last):
rqworker_1 | File "/usr/local/bin/rq", line 9, in <module>
rqworker_1 | load_entry_point('rq==0.10.0', 'console_scripts', 'rq')()
rqworker_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
rqworker_1 | return self.main(*args, **kwargs)
rqworker_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
rqworker_1 | rv = self.invoke(ctx)
rqworker_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
rqworker_1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
rqworker_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
rqworker_1 | return ctx.invoke(self.callback, **ctx.params)
rqworker_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
rqworker_1 | return callback(*args, **kwargs)
rqworker_1 | File "/usr/local/lib/python3.5/dist-packages/rq/cli/cli.py", line 73, in wrapper
rqworker_1 | return ctx.invoke(func, cli_config, *args[1:], **kwargs)
rqworker_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
rqworker_1 | return callback(*args, **kwargs)
rqworker_1 | File "/usr/local/lib/python3.5/dist-packages/rq/cli/cli.py", line 189, in worker
rqworker_1 | settings = read_config_file(cli_config.config) if cli_config.config else {}
rqworker_1 | File "/usr/local/lib/python3.5/dist-packages/rq/cli/helpers.py", line 27, in read_config_file
rqworker_1 | settings = importlib.import_module(module)
rqworker_1 | File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
rqworker_1 | return _bootstrap._gcd_import(name[level:], package, level)
rqworker_1 | File "<frozen importlib._bootstrap>", line 986, in _gcd_import
rqworker_1 | File "<frozen importlib._bootstrap>", line 969, in _find_and_load
rqworker_1 | File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
rqworker_1 | ImportError: No module named 'docsbox.settings'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.