• HI folks:

    I've got Booktype 2.0 running on Ubuntu 14.04 LTS. I am able to login, create new books, create chapters, etc.

    When I go to publish, i get:

    Exporting. Please wait.

    This stays here indefinitely.

    I followed the instructions on how to install MPDF1. I did so. I am able to use the commands from the help to make the example PDFs.

    In booktype, when I click on settings for any of the output mechanisms (Screen PDF, etc.) nothing happens.

    Methinks I am missing some key step for book rendering.

    Where can i look for errors why it's not publishing?

    is objavi required for booktype 2.0?
  • 9 Comments sorted by
  • Hi Robert!

    Objavi is not required for Booktype 2.0. Now publishing is integrated inside Booktype. Not everything is finished at the moment (including the instructions). At the moment Book PDF and EPUB are working.

    Yes, MPDF has to be configured and you also need to have workers running. You can run them from command line like (http://docs.aco.sourcefabric.net/development/profile.html):

      $ ./manage.py celeryd -E --autoreload

    Docs are not ready but you can check more here how it should be done in the production - http://celery.readthedocs.org/en/latest/tutorials/daemonizing.html

    If you run workers from the command line you will get some errors there.

    When it comes to settings, this is what could be wrong. Check you <project>/settings/base.py file. You need to check EXPORT_ALLOWED_HOSTS. Put for now EXPORT_ALLOWED_HOSTS = ['*'] and this would allow anyone to fetch books from your instance. You would want to define IP/hostname of your own instance there. The other thing you need to check is BOOKTYPE_URL in your dev/prod settings file. This variable will be used by the converter scripts to fetch book content, so it has to be valid.

    Aco



  • Hi aleksander:

    thank you for some help.

    When I run SUDO ./manage.py celeryd -E --autoreload

    i get:

    File "./manage.py", line 5, in <module>
       from unipath import Path
    ImportError: No module named unipath

    I tried googling this error. Seems as if it's a pathing issue. but i am completely a n00b here with this.

    if I run:

    find -iname "unipath"

    it shows that it is in couple places:

    ./lib/booktype/build/unipath/unipath
    ./lib/booktype/build/unipath
    ./lib/booktype/lib/python2.7/site-packages/unipath

    if i try to echo DJANGO_SETTINGS_MODULE it is empty

    if i try to echo PYTHON_PATH it is empty

    SO even though the auto installation completed, and the site runs, it seems as if there is soemthing incorrect about the basic Python path and library path settings for use with DJANGO and booktype.

    So i cannot get the worker started.


  • Hi Robert!

    The thing is you need to activate your Virtual Environment before you run that command. What you are missing is some python libraries which must be installed if you want to run Booktype.

    Here you can see instructions how to quickly create  project: 


    So in your case you need to activate virtual environment ("source bin/activate" part in the docs) and then run: 

    $ ./manage.py celeryd -E --autoreload

    manage.py is located in the directory where you created Booktype project (you create it with "createbooktype" script). manage.py will have predefined all the environment variables and paths which are required. Also, do not run it with "sudo". It is not required for this and because it will switch shell environment you will not have defined variables (with "source bin/activate"). So it might fail because of that.

    Also, by default it is configured to use RabbitMQ with Celery, so you will need to install that app also. "pip install" command from that docs page will install required libraries for python to work with RabbitMQ.

    Aco

  • Hi Aco:

    So I have enabled a virtual environment following your link. within BK20 virtual env, after source/bin activate, I am able to run ./manage.py from /var/www/booktype/instance1. However, I do need to use SUDO or else it fails.

    I am able to use ./manage.py to create the super user account. so i know things are working that much.

    I am able to run the command:   $ ./manage.py celeryd -E --autoreload

    and I see that a celery@booktype ready comes up

    I have verified in both dev.py and prod.py that the server name and server URL are setup. (at this point, I don't know WHICH file is being used.)

    I also modified base.py per your instructions and set EXPORT_ALLOWED_HOSTS = ['*']

    I can log in now as the superuser I created. I make a book. With one chapter and one line of text. I go to publish. Then I click on settings for BOOK PDF. I use US8.5 paper, 5mm margins and gutter. go through and hit finish. Then i put a check in the box next to Book PDF and click on Export YOUR BOOK.

    I get the same thing. Exporting, please wait.

    In the terminal still running the celery worker, there's nothing happening. It still is saying celery@BookType ready

    But on the web page in Firefox, it still just sits there: Exporting, please wait.

    Any further help would greatly be appreciated.

  • in booktype-instance1-error.log there is an entry saying:

    OfflineGenerationError: You have offline compression enabled but key "blah blah blah" is missing from offline manifest. You may need to run "python manage.py compress"

    I dont' see any errors in here about exporting.
  • So it seems the research and learning I am achieving regarding Booktype 2.0 is that it's just not ready yet.

    I was reading this link regarding PDF publishing and from reading all the notes here, this 2.0 platform has many issues with PDF and ebook creation.

    I've got a Booktype 2.0 website going on my new install, and still can't make a simple PDF file and from reading the above link, it gives me perspective that more development will be needed to make this functional.

    I cannot find any logging after clicking of "Publish" and there are no errors seemingly being caught that would help me troubleshoot how to create a PDF.

    I guess I've learned that 2.0 has quite a ways to go. I thought it was done and ready for production use. I'm hopeful that in the future this platform will become production ready and functional.

    My friends at a non-profit are using 1.6 and was hoping to move to 2.0 and begin using it in production. I think we'll wait unless I can validate that book publishing actually works and get it working on my test installation of Booktype 2.0.

    I just wanted to say thanks, Aco, for trying to help. Wish I would be able to successfully use Booktype 2.0 for our non-profit that does international Christian publishing. But I think we will necessarily have to stay with 1.6 for now.

    FWIW, I was trying to evaluate Booktype 2.0 for readiness to not only collaborate on and publish works in english, but in Arabic, Hebrew, and other languages. That's my goal, anyways: It was to get BOokType 2.0 installed, configured, and validated that international teams could collaborate on books, and then do Print on Demand to publish works overseas. It's a cool project.







  • Hi Robert!

    The wiki page you found is about PDF engine used in Booktype 1.6. BookJS+Renderer and wkhtmltopdf based engines. Because of certain issues we decided not to use them in Booktype 2.0. There are some other issues besides the ones listed on that page. Because of that we switched to mpdf1 library for generating PDF files. That library fixes a great deal of some basic issues we had with WebKit based PDF generators.

    In general, EPUB generation works fine. We have it in production for like 2 years on certain projects and we don't have any issues with it. We are in the process of finishing and packing it for the vanilla version of Booktype and like you said yourself, it would be best to wait a bit until we are done with it.

    Aco
  • well, i think i'm getting closer anyways. started up a dev instance. this is what I get from the celeryoutput window:

    php /var/www/booktype/instance1/bk20/bkdev/mpdf.php --mpdf=/var/www/mpdf60 --dir=/var/www/booktype/instance1/data/tmp/a8b7761e-0eca-11e5-9980-0800279aae0b/mpdf --output=/var/www/booktype/instance1/data/tmp/a8b7761e-0eca-11e5-9980-0800279aae0b/mpdf/body.pdf
    php returned 1 and produced
    stdout:Could not open input file: /var/www/booktype/instance1/bk20/bkdev/mpdf.php

    stderr:
    [2015-06-11 19:00:52,600: ERROR/MainProcess] Task convert_one[mpdf:deed081f-bf52-4392-825d-a5d37dab9c72] raised exception: OSError(2, 'No such file or directory')

    If you look above where I have highlighted in yellow, there is no mpdf.php file. mpdf installed to /var/www/mpdf60

    so it seems as if it is trying to run a php script located in that path, instead of /var/www/mpdf60 where mpdf60 is installed.

    closer...
  • Well, I was able to get a BookType 2.0 instance to create both Book PDF and epub files.

    Instead of using the auto-install for Ubuntu, I used the manual instructions.

    over the past 48 hours, I must have installed Booktype 2.0 five or six times, trying to learn and overcome the installation documentation limitations. With all I did learn from that process, I was able to get a DEV instance functional.

    Sometimes, I think you have to beat your head on a brick wall until you break through (or you bleed to death).