Can't create book
  • Hi Guys, I'm new here and have a bit of a problem and don't know what to look for.
    I have setup booktype on an Ubuntu VPS, all is working fine, I can greate groups, upload pictures etc. but when I want to create a book then it doesn't work.
    When I for example create the book "test", then I'm redirected to http://www.testsite.nl/test/_info/ and the text that I get is:

    Book does not exist!


    Can't find book "test".

    this are the rights in /var/www/mybooktype/

    drwxr-xr-x 7 www-data www-data 4,0K mrt 28 11:35 .
    drwxr-xr-x 4 root     root     4,0K mrt 21 17:34 ..
    -rw-r--r-- 1 www-data www-data  432 mrt 21 17:34 booki.env
    -rw-r--r-- 1 www-data www-data  585 mrt 21 17:34 booki.wsgi
    drwxrwxrwx 5 www-data www-data 4,0K mrt 21 17:34 data
    -rw-r--r-- 1 www-data www-data 132K mrt 26 23:24 database.sqlite
    -rw-r--r-- 1 www-data www-data 1,5K mrt 21 17:53 fastcgi.nginx
    -rw-r--r-- 1 www-data www-data 1,4K mrt 21 17:34 gunicorn.nginx
    -rw-r--r-- 1 www-data www-data    0 mrt 21 17:34 __init__.py
    -rw-r--r-- 1 www-data www-data  118 mrt 21 17:38 __init__.pyc
    drwxr-xr-x 2 www-data www-data 4,0K mrt 21 17:34 lib
    drwxrwxrwx 2 www-data www-data 4,0K mrt 21 18:07 logs
    -rw-r--r-- 1 www-data www-data 4,2K mrt 23 12:51 settings.py
    -rw-r--r-- 1 www-data www-data 4,5K mrt 24 12:14 settings.pyc
    drwxrwxrwx 2 www-data www-data 4,0K mrt 21 17:34 static
    drwxr-xr-x 2 www-data www-data 4,0K mrt 21 17:34 templates
    -rw-r--r-- 1 www-data www-data 1,4K mrt 21 17:34 wsgi.apache

    This in ls -labh /var/www/Booktype/

    drwxr-xr-x 8 wsvb wsvb 4,0K mrt 21 17:31 .
    drwxr-xr-x 4 root root 4,0K mrt 21 17:34 ..
    -rw-r--r-- 1 test test  126 mrt 21 17:31 AUTHORS.txt
    -rw-r--r-- 1 test test  411 mrt 21 17:31 CHANGES.txt
    drwxr-xr-x 3 test test 4,0K mrt 21 17:31 doc
    drwxr-xr-x 8 test test 4,0K mrt 21 17:31 .git
    -rw-r--r-- 1 test test   47 mrt 21 17:31 .gitignore
    -rw-r--r-- 1 test test 7,5K mrt 21 17:31 INSTALL
    drwxr-xr-x 5 test test 4,0K mrt 21 17:31 lib
    -rw-r--r-- 1 test test  34K mrt 21 17:31 LICENSE.txt
    -rw-r--r-- 1 test test  617 mrt 21 17:31 README.txt
    drwxr-xr-x 2 test test 4,0K mrt 21 17:31 scripts
    -rw-r--r-- 1 test test 1,5K mrt 21 17:31 setup.py
    drwxr-xr-x 2 test test 4,0K mrt 21 17:31 tests
    drwxr-xr-x 3 test test 4,0K mrt 21 17:31 tools
    -rw-r--r-- 1 test test   14 mrt 21 17:31 VERSION.txt

    these are the last entries in the booki.log:

    2012-03-26 23:51:36,019 - booki - ERROR - Traceback (most recent call last):
      File "/var/www/Booktype/lib/sputnik/__init__.py", line 166, in smembers
        result =  [rdecode(el) for el in list(sputnik.rcon.smembers(key))]
      File "/var/www/Booktype/lib/redis/client.py", line 897, in smembers
        return self.execute_command('SMEMBERS', name)
      File "/var/www/Booktype/lib/redis/client.py", line 330, in execute_command
        **options
      File "/var/www/Booktype/lib/redis/client.py", line 312, in _execute_command
        return self.parse_response(command_name, **options)
      File "/var/www/Booktype/lib/redis/client.py", line 392, in parse_response
        return self.RESPONSE_CALLBACKS[command_name](response, **options)
      File "/var/www/Booktype/lib/redis/client.py", line 227, in <lambda>
        lambda r: set(r)
    TypeError: 'NoneType' object is not iterable

    2012-03-26 23:51:36,019 - booki - ERROR - None

    and these are the last entries in the apache error log:

    [Wed Mar 28 11:35:43 2012] [error] /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/__init__.py:19: DeprecationWarning: settings.DATABASE_* is deprecated; use settings.DATABASES instead.
    [Wed Mar 28 11:35:43 2012] [error]   DeprecationWarning
    [Wed Mar 28 11:35:43 2012] [error] /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/__init__.py:60: DeprecationWarning: Short names for ENGINE in database configurations are deprecated. Prepend default.ENGINE with 'django.db.backends.'
    [Wed Mar 28 11:35:43 2012] [error]   DeprecationWarning
    [Wed Mar 28 11:35:44 2012] [error] /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/template/loaders/filesystem.py:58: DeprecationWarning: 'django.template.loaders.filesystem.load_template_source' is deprecated; use 'django.template.loaders.filesystem.Loader' instead.
    [Wed Mar 28 11:35:44 2012] [error]   DeprecationWarning
    [Wed Mar 28 11:35:44 2012] [error] /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/template/loaders/app_directories.py:71: DeprecationWarning: 'django.template.loaders.app_directories.load_template_source' is deprecated; use 'django.template.loaders.app_directories.Loader' instead.
    [Wed Mar 28 11:35:44 2012] [error]   DeprecationWarning

    I hope that someone can point out where I should look to make this work.

    Thanks!


    Post edited by Ruud de Vries at 2012-03-28 05:44:42
  • 10 Comments sorted by
  • Hi Aleksander, thanks! Your solution worked.
    For other people with the same problem:
    This is the comment from Aleksander that I got:


    You can go with your super user account (root in your
    case) to http://testsite.com/admin/ and
    create at least one value of Language and License. Don't edit the Books and
    other items in this /admin/ interface because they should be edited in Booktype
    interface (there is also some other logic behind.. so that is why).





  • django-admin.py runserver and redis-server are both running as the "test" user.
    Post edited by Ruud de Vries at 2012-03-28 05:46:35
  • Is your installation somewhere on the internets so i can try it (you can send me email) to see what is going on? This part of interface (create book) is not connected with Redis. Are you running it with mod_wsgi in Apache or you use Apache as proxy to python server (django-admin runserver...)?
  • Hi Aleksander, the installation is running on the internet, I will send you a PM with the details.
    I'm running it with mod_wsgi, but I also have django-admin runserver running.
  • CANNOT CREATE SCREEN PDF or BOOK or E-BOOK. Please help me! How to troubleshoot and fix it

    I have installed booktype on a debian(remotely via ssh, cause I am not at home at the moment), followed the instructions, created some users, created 1 book with a section, chapters, I can see the draft but when I go to publishing, I got this error:

    Unknown error while trying to publish this book.

    Is there any TCP restriction which ports should be opened besides 80? Where to look? Is there any admin mode at booktype?

    Nothing is generated on booktype-error.log

    I am amazed how nice is this tool, please help me so that I can use try it

    Thanks,
    Marcelo

    Post edited by Marcelo Aragao at 2013-02-21 20:10:38
  • Hi Marcelo!

    You need to install or have access to our book production engine. There are couple of ways how you can do it:
    1) Order our free Booktype Pro Starter model at http://www.booktype.pro/
    2) Have Booktype server on public IP with open port 80. Edit settings.py file and set THIS_BOOKI_SERVER to point to your public IP
    3) If you don't want to or can't have server accessible on public IP you can install our book production called Objavi. More info here - https://wiki.sourcefabric.org/display/Booktype/Objavi

    Hope it helps!

    Aco
  • Thank you Aleksandar!!!!!

    I did all options, starting with "1)"....account is created, I will wait next instructions.

    I assume that option 2) only works if  option 3) is available installed on my server correct? 
    I tried 2) but it did not work.
    I tried 3) and everything was installed ok until last step, where I got an error after running 
    bash post_install.sh"

    Using 'www-data' as web server account.
    Using 'www-data' as web server account group.
    Error: No module named classic
    /usr/local/lib/python2.6/dist-packages/django/db/__init__.py:19: DeprecationWarning: settings.DATABASE_* is deprecated; use settings.DATABASES instead.
      DeprecationWarning
    ....
    Error: No module named classic

    I edit the apache.conf and added on apache etc, but publishing still did not work.
    If there is anything else that you can help me, I appreciate.


    Wishing you the best,

    Marcelo
    Post edited by Marcelo Aragao at 2013-02-21 20:13:09
  • Hi marcelo,

    option 2) works without step 3).  In settings.py (must restart Apache if you are using it) you must have set OBJAVI_URL = "http://objavi.booktype.pro/" and THIS_BOOKI_SERVER points yo your public IP + port. For instance THIS_BOOKI_SERVER='4.4.4.4:8080'.

    Person who is managing 3) is unavailable at this moment. You will be contacted soon :)

    Aco
  • Hi there!

    As for (3), did you by any chance name the destination directory "objavi", like in /var/www/objavi?

    - Borko

  • Hi Borko,

    Yes and I did it again as:
    ./scripts/create_site --with-booktype=/usr/local/src/Booktype /var/www/objavi_site

    In any case I am happy the option '1)' and '2)' are working great!
    If someday I get '3)' done, then even better!