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

[8.0 / 14.04] My Installation Method + Error: Failure! Connection to DOCS service was not established or convertion to PDF unsuccessful! Details: name '_readFile' is not defined #47

Closed
lukebranch opened this issue Mar 21, 2015 · 28 comments

Comments

@lukebranch
Copy link

Hi @sraps ,

Thanks for all your work on these reporting modules. I've attempted to put together an installation guide that I would like to publish on the help forums for installing Aeroo Reports on Ubuntu 14.04 and Odoo 8.0.

Unfortunately when I get to 30) (ie. the last step) in the guide, I receive the following error through the wizard interface:

Failure! Connection to DOCS service was not established or convertion to PDF unsuccessful!

Details:

name '_readFile' is not defined

Here's the guide:

I have managed to get this working using the following method on a clean Ubuntu 14.04 installation:

Ubuntu 14.04 Aeroo Reports installation method:
Install Git:

  1. sudo apt-get install git

Install AerooLib:

  1.  sudo apt-get install python-setuptools
    
  2.  sudo apt-get install python-genshi python-cairo python-lxml
    
  3.  sudo apt-get install libreoffice-script-provider-python
    
  4.  sudo mkdir /opt/aeroo
    
  5.  cd /opt/aeroo
    
  6.  sudo git clone https://github.com/aeroo/aeroolib.git
    
  7.  cd /opt/aeroo/aeroolib
    
  8.  sudo python setup.py install
    

Install AerooDOCS (see: https://github.com/aeroo/aeroo_docs/wiki/Installation-example-for-Ubuntu-14.04-LTS for original post):

  1.  sudo apt-get install python3-pip
    
  2. sudo pip3 install jsonrpc2 daemonize
    
  3. cd /opt/aeroo
    
  4. sudo git clone https://github.com/aeroo/aeroo_docs.git
    
  5. sudo python3 /opt/aeroo/aeroo_docs/aeroo-docs start -c /etc/aeroo-docs.conf
    
  6. sudo ln -s /opt/aeroo/aeroo_docs/aeroo-docs /etc/init.d/aeroo-docs
    
  7. sudo update-rc.d aeroo-docs defaults
    
  8. sudo service aeroo-docs start
    

[ ! ] If you encounter and error "Unable to lock on the pidfile while trying 16) just restart your server (sudo shutdown -r now) and try 16) again after reboot.

Install Odoo from Source:

  1.  cd /tmp
    
  2. sudo wget https://raw.githubusercontent.com/lukebranch/odoo-install-scripts/master/odoo-saas4/ubuntu-14-04/odoo_install.sh
    
  3. sudo sh odoo_install.sh
    
  4. restart the server (sudo shutdown -r now)
    

Install Aeroo Reports:

  1. sudo apt-get install python-cups
  2. cd /opt/odoo/custom
  3. sudo git clone -b master https://github.com/aeroo/aeroo_reports.git

After following the (above) steps in this guide you should have Aeroo Reports installed correctly on your server for Ubuntu 14.04 and Odoo 8.0. You'll just need to create a database and install the required Aeroo reports modules you need for that database.

[ ! ] Do not have aeroo_report_sample in your addons directory or you will get an error message when updating module list:
Warning! Unmet python dependencies! No module named cups

Install report_aeroo module in Odoo database:
24) Go to Settings >> Users >> Administrator in the backend of Odoo
25) Tick the box next to 'Technical Features' and Save, then refresh your browser window.
26) Go to Settings >> Update Modules List > Update
27) Go to Settings >> Local Modules > Search for: Aeroo
28) Install report_aeroo
29) You'll be confronted with an installation wizard, click: Continue >> Choose Simple Authentication from the Authentication dropdown list, and add username and password: anonymous
[ ! ] You can change the username and password in: /etc/aeroo-docs.conf if required.
30) Click Apply and Test.

@lukebranch lukebranch changed the title [8.0 / 14.04] My Installation Method + Error: Failure! Connection to DOCS service was not established or convertion to PDF unsuccessful! [8.0 / 14.04] My Installation Method + Error: Failure! Connection to DOCS service was not established or convertion to PDF unsuccessful! Details: name '_readFile' is not defined Mar 21, 2015
@lukebranch
Copy link
Author

[UPDATE 8.0/Master]
After following the recommendations in this issue:

#45

The wizard now gets stuck at the same step (after entering authentication details) with the following error message:

Failure! Connection to DOCS service was not established or convertion to PDF unsuccessful!

Details:
argument of type 'instancemethod' is not iterable

@mstuttgart
Copy link

@lukebranch I get the same error on Aeroo Docs.

Error: name '_readFile' is not defined
Take a look here: aeroo/aeroo_docs#7

@lukebranch
Copy link
Author

@mstuttgart ,

Thanks for the fix! I'm going to test your changes on my local dev instance. I'll post back here and let you know how I get on.

@diezcode
Copy link

Failure Connection DOCS Error:
File not found: report_aeroo_ooo/test_temp.odt

@lukebranch
Copy link
Author

@diezcode ,

I think you're using an older version of Aeroo, or the Jamotion fork. I'd recommend removing the old Aeroo repositories you have and starting fresh.

I put together a (draft) installation method for Aeroo on Ubuntu 14.04. It is not complete yet, but it should give you a good place to start with installing Aeroo:

https://www.odoo.com/forum/help-1/question/solved-8-0-how-can-i-install-the-official-aeroo-reports-alistek-for-odoo-version-8-76044

@diezcode
Copy link

A I have change the port to 8989 like in the aeroo-docs.conf .
Now I don't have an error
It works fine, thx

@lukebranch
Copy link
Author

@sraps ,

I've updated my steps to install on Ubuntu 14.04. Please see the following:

Ubuntu 14.04 Aeroo Reports installation method:
Install Git:

  1.  sudo apt-get install git
    

Install AerooLib:

  1.  sudo apt-get install python-setuptools
    
  2.  sudo apt-get install python-genshi python-cairo python-lxml
    
  3.  sudo apt-get install libreoffice-script-provider-python
    
  4.  sudo mkdir /opt/aeroo
    
  5.  cd /opt/aeroo
    
  6.  sudo git clone https://github.com/aeroo/aeroolib.git
    
  7.  cd /opt/aeroo/aeroolib
    
  8.  sudo python setup.py install
    

Create Init Script for OpenOffice (Headless Mode) - (see: https://www.odoo.com/forum/help-1/question/how-to-install-aeroo-reports-2780 for original post from Ahmet):

  1.    sudo pico -w /etc/init.d/office
    
  2.  Copy and paste this:
    

#!/bin/sh

/usr/bin/soffice --nologo --nofirststartwizard --headless --norestore --invisible "--accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;" &

  1.    sudo chmod +x /etc/init.d/office
    
  2.    sudo update-rc.d office defaults
    
  3.    sudo /etc/init.d/office
    
  4.    telnet localhost 8100
    
  5.    You should see something like the following message (this means it has established a connection successfully):
    

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
e--'com.sun.star.bridge.XProtocolPropertiesUrpProtocolProperties.UrpProtocolPropertiesTidE--L

Install AerooDOCS (see: https://github.com/aeroo/aeroo_docs/wiki/Installation-example-for-Ubuntu-14.04-LTS for original post):

  1.  sudo apt-get install python3-pip
    
  2. sudo pip3 install jsonrpc2 daemonize
    
  3. cd /opt/aeroo
    
  4. sudo git clone https://github.com/aeroo/aeroo_docs.git
    
  5. sudo python3 /opt/aeroo/aeroo_docs/aeroo-docs start -c /etc/aeroo-docs.conf
    
  6. sudo ln -s /opt/aeroo/aeroo_docs/aeroo-docs /etc/init.d/aeroo-docs
    
  7. sudo update-rc.d aeroo-docs defaults
    
  8. sudo service aeroo-docs start
             [ ! ]  If you encounter and error "Unable to lock on the pidfile while trying #16 just restart your server (sudo shutdown -r now)                         and try #16 again after reboot.
    

Install Odoo from Source:

  1.  cd /tmp
    
  2. sudo wget https://raw.githubusercontent.com/lukebranch/odoo-install-scripts/master/odoo-saas4/ubuntu-14-04/odoo_install.sh
    
  3. sudo sh odoo_install.sh
    
  4. restart the server (sudo shutdown -r now)
    

Install Aeroo Reports:

  1. sudo apt-get install python-cups
  2. cd /opt/odoo/custom
  3. sudo git clone -b master https://github.com/aeroo/aeroo_reports.git

After following the (above) steps in this guide you should have Aeroo Reports installed correctly on your server for Ubuntu 14.04 and Odoo 8.0. You'll just need to create a database and install the required Aeroo reports modules you need for that database.

[ ! ] Do not have aeroo_report_sample in your addons directory or you will get an error message when updating module list:
Warning! Unmet python dependencies! No module named cups

Install report_aeroo module in Odoo database:

  1. Go to Settings >> Users >> Administrator in the backend of Odoo

  2. Tick the box next to 'Technical Features' and Save, then refresh your browser window.

  3. Go to Settings >> Update Modules List > Update

  4. Go to Settings >> Local Modules > Search for: Aeroo

  5. Install report_aeroo

  6. You'll be confronted with an installation wizard, click: Continue >> Choose Simple Authentication from the Authentication dropdown list, and add username and password: anonymous
    [ ! ] You can change the username and password in: /etc/aeroo-docs.conf if required.

  7. Click Apply and Test. You should see the following message if it was successful:

Success! Connection to the DOCS service was successfully established and PDF convertion is working.

You now have a fully operational Aeroo Reports installation in Ubuntu 14.04.

Would you accept a PR with an SH script for installing Aeroo reports from source?

@diezcode
Copy link

diezcode commented Apr 1, 2015

HTTPConnectionPool(host='localhost', port=8989): Max retries exceeded with url: / (Caused by <class 'socket.error'>: [Errno 111] Connection refused)

@lukebranch
Copy link
Author

@diezcode ,

Can you try the following:

telnet localhost 8100

or try starting OpenOffice again:

sudo /etc/init.d/office

I had OpenOffice crash on me when I was doing very large reports (eg. 10,000+ products with images to XLS format).

@diezcode
Copy link

diezcode commented Apr 1, 2015

same error again when I try to connect with DOCS

@sraps
Copy link
Contributor

sraps commented Apr 1, 2015

@lukebranch

I had OpenOffice crash on me when I was doing very large reports (eg. 10,000+ products with images to XLS format).

I guess you should separate your report in parts (like product categories), then convert them separately to PDF, after which - merge them into single document. In other words do the report on product category, and turn on process separately.

IMHO office process just runs out of resources - you could test this by creating ODS file without converting it to PDF, then open the file in office manually from UI, try exporting it to XLS/PDF. See what happens.

@lukebranch
Copy link
Author

@sraps ,

Thanks for the tip! I'll try that now.

I'm still trying to understand how to use the Process Separately function. What I would like to do is split off my ODS/XLS by category (for https://github.com/ingadhoc/odoo-addons/tree/8.0/product_catalog_aeroo_report) into different worksheets somehow.

For example, if I have the following Categories:

Category A
Category B
Category C

I'd really like to do a foreach loop to put the contents of each category into a different worksheet. Do you know if there a way of accomplishing this with Aeroo reports, or is this beyond the scope of the default functionality?

Thanks for all your work on this reporting tool, it is really valuable contribution to the Odoo community.

@sraps
Copy link
Contributor

sraps commented Apr 1, 2015

@lukebranch
thanks for good words. You can help spreading the word about Aeroo on social media - Aeroo really needs critical mass of users.

About worksheets - unfortunately, it's impossible Aeroo now works only on first worksheet.

@lukebranch
Copy link
Author

@sraps ,

Thank you for your help. I will be putting together some tutorials about getting started with reporting in Aeroo Reports and 8.0 on the help forum at help.odoo.com soon.

I'm going to be putting together some sample reports to get people started as well, i'd be happy to submit PR's for them once they're done if you are open to receiving contributions from the community for basic sample reports like this (eg. quotation/saleorder, invoice, etc.).

@lukebranch
Copy link
Author

@diezcode ,

Could you provide me with some steps to reproduce the error from a clean Ubuntu 14.04 installation? It's a bit difficult to help, as I cannot reproduce the error you have mentioned.

@diezcode
Copy link

diezcode commented Apr 2, 2015

With the normal installation I have no problems. But when I let Odoo run in a docker container I can't use aeroo-docs in that container.

@lukebranch
Copy link
Author

@sraps ,

FYI - i've just completed a working installation script for installing Aeroo Reports for Odoo 8.0 in Ubuntu 14.04 here:

https://github.com/OdooCommunityWidgets/install-scripts/blob/8.0/aeroo_reports/aeroo_install.sh

There's a forum post regarding the installation method and the script here:

https://www.odoo.com/forum/help-1/question/8-0-how-can-i-install-the-official-aeroo-reports-alistek-for-odoo-version-8-solved-installation-script-76044

Would you accept a PR for the installation script, or would you prefer to keep it a community script outside of the github.com/aeroo repositories?

@lukebranch
Copy link
Author

@diezcode ,

I'd recommend checking out the script mentioned above. I'm not experienced with docker at this point in time, however I think a good place to look if you're having trouble would be the /etc/aeroo-docs.conf file.

You may need to modify the settings in this file based on your docker setup.

@sraps
Copy link
Contributor

sraps commented May 26, 2015

@lukebranch At the moment I can not try out the script.. Could someone review it and then I'll include it in repository.

@lukebranch
Copy link
Author

@sraps ,

No problem. It's currently being tested by some community members on the forums as well as in my own instances, however I have asked Andre Schenkels' (@aschenkels-ictstudio) for his insight and advice on the script in this issue here:

OdooCommunityWidgets/install-scripts#2

Andre has written a number of similar-style scripts that have been widely adopted by the Odoo community and therefore his opinion on this would be invaluable (for example the Odoo install script found here):

https://github.com/aschenkels-ictstudio/openerp-install-scripts/blob/master/odoo-saas4/ubuntu-14-04/odoo_install.sh

If anyone else can test out the script themselves in the meantime however it would be appreciated. Please report any issues here if possible:

https://github.com/OdooCommunityWidgets/install-scripts/issues/

@lukebranch
Copy link
Author

@sraps ,

If it helps, I believe Jay Vora (@JayVora-SerpentCS) from Serpent CS is also aware of the script:

http://www.serpentcs.com/serpentcs-aeroo-report-installation-script-odoo

so hopefully his team can provide some feedback on the script as well.

@VeeSot
Copy link

VeeSot commented Aug 9, 2015

May be this article can help you.It write in Russian,but I think - you understand,because need copy only two code-block an insert their in aeroo script.

@lukebranch
Copy link
Author

@VeeSot ,

Thanks for the link, could you explain what you mean about adding it to the Aeroo installation script?

I have tried google translate for the article you posted a link to, but it doesn't make much sense to me.

@VeeSot
Copy link

VeeSot commented Aug 9, 2015

@lukebranch ,
I'm used your script , which you posted in Odoo.com ,but it don't work.I'm tested his on Ubuntu 14.04 LTS and Debian 8.
Because,i wrote article for Russian users from Oddo Rusia with solve this problem.
I'm don't offer adding my solve in your instalation script,this is something between hack and patch.
Sorry for my English

@lukebranch
Copy link
Author

@VeeSot ,

What issues did you run into with the script? Did you restart the server after the installation was completed?

There are a number of people who have been using this script without issue recently however if you've run into issues with it personally i'd definitely be interested in hearing about what issues you've run into and how I can revise my script to resolve these issues.

@TheCloneMaster
Copy link

TheCloneMaster commented Aug 9, 2015 via email

@lukebranch
Copy link
Author

@TheCloneMaster ,

good to hear! Out of curiousity, what paths did you need to adjust and why?

@TheCloneMaster
Copy link

Hi,

Basically the path for the addons, as xoe keeps everything inside of
/home/erp_user/instance_name

By the way, great job!!
El 11/8/2015 7:05, "Luke Branch" [email protected] escribió:

@TheCloneMaster https://github.com/TheCloneMaster ,

good to hear! Out of curiousity, what paths did you need to adjust and why?


Reply to this email directly or view it on GitHub
#47 (comment).

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

6 participants