Problem installing Objavi
  • Hey guys, I've followed through setting up booktype and got that running on Apache, then decided we wanted to try setting up our own Objavi server ...

    I went through https://wiki.sourcefabric.org/display/Booktype/Installation but when I got to the POST_INSTALL I ran into two problems:

    First, the system did not recognize django-admin as a command -- everywhere else I've used django-admin.py so I changed the post_install.sh script ...  having done that, I ran into my second problem:
    Using 'www-data' as web server account.
    Using 'www-data' as web server account group.
    Error: No module named classic
    Error: No module named classic


    Installing the Supervisor configuration file for Objavi...
    Can anyone point me to what's wrong with my django that causes the "No module named classic" error every time?  I only installed django when I was setting up Booktype, but all of that has been working correctly!

    The rest of the install "worked" but when I try to access it I just get errors, and they look eerily familiar ;-)

    [Sun Feb 24 06:43:55 2013] [error] [client 66.67.20.15] TemplateSyntaxError: Caught ImportError while rendering: No module named classic
  • 7 Comments sorted by
  • This can happen if the Objavi installation directory is named 'objavi', thus clashing with lib/objavi. This should be checked in the installation script, but is not currently.
  • Wow. Ok!

    It's not that it's not checked -- the instructions specifically say to install it to /var/www/objavi
    I changed the directory name and that step succeeded, thank you!  Someone should fix the docs, but I'll put a comment in there for now.
    Post edited by Joel Bennett at 2013-02-24 16:59:59
  • Thanks for pointing this out!  The instructions page is now fixed.
  • I had one other problem, by the way.  After I got the post_install step to succeed, I visited the web url and got an error indicating that I needed to install the redis library -- I was missing a symlink from my /var/www/objavi_site/lib to the redis library in the Booktype source.

    For the record, I fixed it with this command-line (note the path is specific to my environment):

    sudo ln -s /opt/booktype/Booktype/lib/redis /var/www/objavi_site/lib/redis


    By the way, one last question: the old url was http://objavi.booktype.pro/objavi.cgi but as far as I can tell, with the wsgi configuration, the /objavi.cgi url doesn't exist -- can I assume the / url is enough? That seems to render the same page on my install as http://objavi.booktype.pro/objavi.cgi ...

    I guess I'll just go test that ;)
  • Hmm.. seems I have further problems. Trying the root url renders the form ok, but when I click the "OBJAVI" button without changing any defaults, I get an error:

    Exception Value: 'module' object has no attribute 'VERSION'
    Exception Location: usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py in _get_client, line 626

    I can work at debugging this, but I'm starting to wonder if it actually works, why booktype.pro is still using objavi.cgi -- should I pull an old commit from the git repo from before you got rid of it?

    Giving up for tonight I-)
    Post edited by Joel Bennett at 2013-02-26 00:55:26
  • You should probably install redis library for Objavi with pip. Redis library which comes with Booktype has been modified to be thread safe, it is not standard redis library and is probably missing VERSION in the version which was modified. Booktype would not work with standard Redis library... Well it would work but things would go crazy at some point :) At this stage it is still assumed you will install Objavi and Booktype separately (main problem is as you noticed modified Redis library and he did not have time to work on it yet), but for the release after the next one they will work as one app.

    The URL for new Objavi is http://objavi.booktype.pro/. We must have rewrite rules on objavi.book.pro because it must work with older version of Booktype which are using the old URL. That is just us trying to be nice :) But if you are making your own Objavi install you should just use new style of URL.

    Aco
  • Awesome, thanks for that. I do still have a problem though: when I try to actually use it, it goes to "loading..." indefinitely in the browser. From Booktype I get the "Please wait. It will take couple of moments. Your book is being generated."  ... but then it doesn't seem to ever finish.

    I can't seem to find any errors in the logs that I know where to look (apart from an error from apache.log about the duplicate redis module when Booktype starts up, which looks like I can safely ignore it).  And of course, the Objavi/logs/objavi.log file is empty ... so I can't really tell where it's going wrong.

    I *did* think to chown the www/Objavi folder to www:data (a step that probably should be added to the install manual?), but that didn't make any difference, as far as I can tell.