Closed Nucleardragon88 closed 7 years ago
fixed
may be you can at least tell what is dependies of this module?
hi,
the error wasn't the result of a missing dependency. WindowsError doesn't exist on Linux but got thrown by the python library.
To awnser your question about the dependencies:
The module only has 3 python dependencies (see manifest.py)
pdfconv uses either cometypes or unoconv, which needs to be installed on the system to be executed on the command line interface.
The best way to do that is by using the apt-get command.
sudo apt-get install -y unoconv
Already have all dependencies, but the module stil doesn't work.
pip install requests cachetools pdfconv Requirement already satisfied: requests in /usr/local/lib/python2.7/dist-packages Requirement already satisfied: cachetools in /usr/local/lib/python2.7/dist-packages Requirement already satisfied: pdfconv in /usr/local/lib/python2.7/dist-packages
apt-get install -y unoconv Reading package lists... Done Building dependency tree Reading state information... Done unoconv is already the newest version (0.7-1.1). 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Hey, can you please pull the project again and send the new odoo log. Because the WindowsError shouldn't be thrown anymore.
Please:
2017-08-26 14:37:58,428 17323 INFO ? werkzeug: 10...12 - - [26/Aug/2017 14:37:58] "GET /muk_web_preview/static/lib/PDFjs/web/viewer.html?file=/web/preview/converter/msoffice?url=%2Fweb%2Fcontent%2F874%3Fdownload%3Dtrue HTTP/1.0" 200 - 2017-08-26 14:37:59,825 17323 INFO erp..com werkzeug: 10...12 - - [26/Aug/2017 14:37:59] "GET /web/preview/converter/msoffice?url=%2Fweb%2Fcontent%2F874%3Fdownload%3Dtrue HTTP/1.0" 500 - 2017-08-26 14:37:59,840 17323 ERROR erp..com werkzeug: Error on request: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 180, in run_wsgi execute(self.server.app) File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 168, in execute application_iter = app(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 184, in application return werkzeug.contrib.fixers.ProxyFix(application_unproxied)(environ, start_response) File "/usr/lib/python2.7/dist-packages/werkzeug/contrib/fixers.py", line 148, in call return self.app(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 172, in application_unproxied result = handler(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1308, in call return self.dispatch(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1282, in call return self.app(environ, start_wrapped) File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 591, in call return self.app(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1481, in dispatch result = ir_http._dispatch() File "/usr/lib/python2.7/dist-packages/odoo/addons/website_sale/models/ir_http.py", line 15, in _dispatch return super(IrHttp, cls)._dispatch() File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/ir_http.py", line 218, in _dispatch resp = super(Http, cls)._dispatch() File "/usr/lib/python2.7/dist-packages/odoo/addons/web_editor/models/ir_http.py", line 21, in _dispatch return super(IrHttp, cls)._dispatch() File "/usr/lib/python2.7/dist-packages/odoo/addons/utm/models/ir_http.py", line 20, in _dispatch response = super(IrHttp, cls)._dispatch() File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_http.py", line 199, in _dispatch return cls._handle_exception(e) File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/ir_http.py", line 270, in _handle_exception return super(Http, cls)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_http.py", line 169, in _handle_exception return request._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 768, in _handle_exception return super(HttpRequest, self)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_http.py", line 195, in _dispatch result = request.dispatch() File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 827, in dispatch r = self._call_function(self.params) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 333, in _call_function return checked_call(self.db, *args, *kwargs) File "/usr/lib/python2.7/dist-packages/odoo/service/model.py", line 101, in wrapper return f(dbname, args, kwargs) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 326, in checked_call result = self.endpoint(*a, kw) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 935, in call return self.method(*args, *kw) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 506, in response_wrap response = f(args, kw) File "/var/lib/odoo/.local/share/Odoo/addons/10.0/muk_web_preview_msoffice/controllers/main.py", line 72, in convert_msoffice return self._get_response(url, export_filename) File "/var/lib/odoo/.local/share/Odoo/addons/10.0/muk_web_preview_msoffice/controllers/main.py", line 97, in _get_response except (ImportError, IOError, WindowsError) as error: NameError: global name 'WindowsError' is not defined
ok that shouldn't happen... is your pdfconv up to date? we just updated it yesterday...
muk_web_preview_msoffice - version: 10.0.1.0.3 pdfconv - version: 1.0.10
I have latest versions:
Technical Name | muk_web_preview_msoffice |
---|---|
License | Affero GPL-3 |
Latest Version | 10.0.1.0.3 |
pip show pdfconv Name: pdfconv Version: 1.0.10 Summary: PDF Converter Home-page: https://github.com/keshrath/pdfconv Author: Mathias Markl Author-email: mathias.markl@mukit.at License: GPLv2 Location: /usr/local/lib/python2.7/dist-packages Requires:
I'm sorry i just installed everything on a new machine to test it and didn't have any issues:
sudo apt-get install unoconv git clone https://github.com/muk-it/muk_web.git git clone https://github.com/keshrath/pdfconv.git cd pdfconv/ sudo python setup.py install sudo -H pip install cachetools
... add muk_web modules to odoo ... service odoo restart ... install modules ...
and the module works fine for me... I tested it in the odoo chat with a .doc file...
reinstall can not help, I don't know how you can use your module...
aptitude show unoconv Package: unoconv State: installed Automatically installed: no Version: 0.7-1.1 Priority: extra Section: universe/text Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Architecture: all Uncompressed Size: 332 k Depends: python3, python3-uno (>= 4.0) Recommends: libreoffice-writer, libreoffice-draw, libreoffice-calc, libreoffice-impress Conflicts: odt2txt (<= 0.3-1) Description: converter between LibreOffice document formats This package provides a commandline utility which can convert from any document format that LibreOffice can import to any document format it can export. It uses LibreOffice's UNO bindings for non-interactive conversion of documents.
Supported document formats include Open Document format, MS Word, MS Office Open/MS OOXML, PDF, HTML, XHTML, RTF, DocBook, and more. Homepage: http://dag.wieers.com/home-made/unoconv/
This is my all python modules in the host sytem:
pip list DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. Babel (2.3.4) beautifulsoup4 (4.4.1) bzr (2.7.0) cachetools (2.0.1) Chameleon (2.24) chardet (2.3.0) configobj (5.0.6) cryptography (1.2.3) cycler (0.9.0) Cython (0.23.4) decorator (4.0.10) docutils (0.12) ebaysdk (2.1.4) ecdsa (0.13) enum34 (1.1.2) feedparser (5.2.1) funcsigs (1.0.2) gdata (2.0.18) gevent (1.1.2) greenlet (0.4.10) html5lib (0.999) httplib2 (0.9.1) idna (2.0) ipaddress (1.0.16) jcconv (0.2.3) Jinja2 (2.8) keyring (7.3) launchpadlib (1.10.3) lazr.restfulclient (0.13.4) lazr.uri (1.0.3) linecache2 (1.0.0) lptools (0.2.0) lxml (3.5.0) Mako (1.0.4) MarkupSafe (0.23) matplotlib (1.5.1) mock (2.0.0) ndg-httpsclient (0.4.0) num2words (0.5.5) numpy (1.11.0) oauth (1.0.1) odoo (10.0.post20170825) ofxparse (0.16) paramiko (1.16.0) passlib (1.6.5) pbr (3.1.1) pdfconv (1.0.10) pdftools (0.37) phonenumbers (8.8.0) Pillow (3.4.1) pip (9.0.1) psutil (4.3.1) psycogreen (1.0) psycopg2 (2.7.1) py-Asterisk (0.5.15) pyasn1 (0.1.9) PyChart (1.39) pycrypto (2.6.1) pydot (1.2.3) Pygments (2.1) pygobject (3.20.0) pygpgme (0.3) pyinotify (0.9.6) pyOpenSSL (0.15.1) pyotp (2.2.6) pyparsing (2.1.10) pyPdf (1.13) Pyrex (0.9.8.5) pyserial (3.1.1) Python-Chart (1.39) python-dateutil (2.5.3) python-ldap (2.4.22) python-openid (2.2.5) python-stdnum (1.6) pytz (2016.7) pyusb (1.0.0) PyWebDAV (0.9.8) pyxdg (0.25) PyYAML (3.12) qrcode (5.3) reportlab (3.3.0) requests (2.11.1) roman (2.0.0) SecretStorage (2.1.3) setuptools (20.7.0) simplejson (3.8.1) six (1.10.0) suds-jurko (0.6) traceback2 (1.4.0) unittest2 (1.1.0) urllib3 (1.13.1) uTidylib (0.2) vatnumber (1.2) virtualenv (15.1.0) vobject (0.9.3) wadllib (1.3.2) Werkzeug (0.11.11) wheel (0.29.0) xlrd (1.0.0) XlsxWriter (0.9.3) xlwt (1.1.2) zope.interface (4.1.3) ZSI (2.1a1)
What I should install or what I can do for use the module muk_web_preview_msoffice with ODOO 10?
aptitude search unoconv i unoconv installed - converter between LibreOffice document formats
pip install pdfconv comtypes unoconv Requirement already satisfied: pdfconv in /usr/local/lib/python2.7/dist-packages Requirement already satisfied: comtypes in /usr/local/lib/python2.7/dist-packages Requirement already satisfied: unoconv in /usr/local/lib/python2.7/dist-packages
invoke-rc.d odoo restart
But I still have errors:
PDF.js v1.7.225 (assembly: 17d135f) Message: Unexpected server response (500) while retrieving PDF "https://erp.****.com/web/preview/converter/msoffice?url=%2Fweb%2Fcontent%2F439%3Fdownload%3Dtrue".
werkzeug: Error on request: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 180, in run_wsgi execute(self.server.app) File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 168, in execute application_iter = app(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 184, in application return werkzeug.contrib.fixers.ProxyFix(application_unproxied)(environ, start_response) File "/usr/lib/python2.7/dist-packages/werkzeug/contrib/fixers.py", line 148, in call return self.app(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 172, in application_unproxied result = handler(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1308, in call return self.dispatch(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1282, in call return self.app(environ, start_wrapped) File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 591, in call return self.app(environ, start_response) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1481, in dispatch result = ir_http._dispatch() File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/ir_http.py", line 218, in _dispatch resp = super(Http, cls)._dispatch() File "/usr/lib/python2.7/dist-packages/odoo/addons/web_editor/models/ir_http.py", line 21, in _dispatch return super(IrHttp, cls)._dispatch() File "/usr/lib/python2.7/dist-packages/odoo/addons/utm/models/ir_http.py", line 20, in _dispatch response = super(IrHttp, cls)._dispatch() File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_http.py", line 199, in _dispatch return cls._handle_exception(e) File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/ir_http.py", line 270, in _handle_exception return super(Http, cls)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_http.py", line 169, in _handle_exception return request._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 768, in _handle_exception return super(HttpRequest, self)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_http.py", line 195, in _dispatch result = request.dispatch() File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 827, in dispatch r = self._call_function(self.params) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 333, in _call_function return checked_call(self.db, *args, *kwargs) File "/usr/lib/python2.7/dist-packages/odoo/service/model.py", line 101, in wrapper return f(dbname, args, kwargs) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 326, in checked_call result = self.endpoint(*a, kw) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 935, in call return self.method(*args, *kw) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 506, in response_wrap response = f(args, kw) File "/var/lib/odoo/.local/share/Odoo/addons/10.0/muk_web_preview_msoffice/controllers/main.py", line 72, in convert_msoffice return self._get_response(url, export_filename) File "/var/lib/odoo/.local/share/Odoo/addons/10.0/muk_web_preview_msoffice/controllers/main.py", line 97, in _get_response except (ImportError, IOError, WindowsError) as error: NameError: global name 'WindowsError' is not defined