EBook Publishing Issue
  • 61 Comments sorted by
  • git clone git://repo.or.cz/objavi2.git
  • Cool. So all problems solved.
  • Hi,
    i am trying to install booktype on our own server but i got stuck with following error:

    getting booklist: http://booki.testurl/booktype/bin/view/TWiki/WebLeftBarWebsList?skin=text
    Traceback (most recent call last):
      File "/srv/www/htdocs/objavi/objavi.cgi", line 453, in <module>
        main()
      File "/srv/www/htdocs/objavi/objavi.cgi", line 446, in main
        output_function(args)
      File "/srv/www/objavi2/objavi/cgi_utils.py", line 219, in output
        content = f(*args, **kwargs)
      File "/srv/www/htdocs/objavi/objavi.cgi", line 156, in mode_form
        'book_options': optionise(twiki_wrapper.get_book_list(server), default=book),
      File "/srv/www/objavi2/objavi/twiki_wrapper.py", line 50, in get_book_list
        f = urlopen(url)
      File "/usr/lib64/python2.7/urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "/usr/lib64/python2.7/urllib2.py", line 397, in open
        response = meth(req, response)
      File "/usr/lib64/python2.7/urllib2.py", line 510, in http_response
        'http', request, response, code, msg, hdrs)
      File "/usr/lib64/python2.7/urllib2.py", line 435, in error
        return self._call_chain(*args)
      File "/usr/lib64/python2.7/urllib2.py", line 369, in _call_chain
        result = func(*args)
      File "/usr/lib64/python2.7/urllib2.py", line 518, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    urllib2.HTTPError: HTTP Error 404: NOT FOUND

    any ideas???
    Thanks!

  • Looks like you didn't put in the correct URLs.
  • Reply to @Flo0502:
    In file objavi/config.py for SERVER_DEFAULTS = {} where you are defining your Booktype clients you must have  'interface': 'Booki'. You probably have 'TWiki'. Scream if it is not the case!
     
  • Reply to @Aleksandar+Erkalović:
    Thx this helped a lot :)

    But now I got an other errormessage:
    ining the following files:
    notify_watcher called with 'cleanup'
    ******* got message "cleanup"
    Traceback (most recent call last):
      File "/srv/www/htdocs/objavi/objavi.cgi", line 453, in <module>
        main()
      File "/srv/www/htdocs/objavi/objavi.cgi", line 446, in main
        output_function(args)
      File "/srv/www/htdocs/objavi/objavi.cgi", line 355, in mode_book
        book.spawn_x()
      File "/srv/www/objavi2/objavi/fmbook.py", line 1095, in spawn_x
        check_call(['xauth', 'add', self.xserver_no, '.', mcookie])
      File "/usr/lib64/python2.7/subprocess.py", line 499, in check_call
        retcode = call(*popenargs, **kwargs)
      File "/usr/lib64/python2.7/subprocess.py", line 486, in call
        return Popen(*popenargs, **kwargs).wait()
      File "/usr/lib64/python2.7/subprocess.py", line 672, in __init__
        errread, errwrite)
      File "/usr/lib64/python2.7/subprocess.py", line 1201, in _execute_child
        raise child_exception
    OSError: [Errno 13] Permission denied

    Thanks again :)
  • Hi Aleksandar,
    I have some questions.  I have recently installed booktype on Ubuntu 12.04.2 LTS and I am having some issue when publishing the book.
    "Unknown error while trying to publish this book"

    This is working in my DEBIAN installation and the configuration is the same. 

    1) What could be wrong? Please see my configuration/logs:

    booktype-access.log
    5.9.66.71 - - [24/Mar/2013:09:04:09 -0500] "GET /export/b1/export HTTP/1.1" 404 524"-" "Python-urllib/2.7"
    booktype-error.log
    [Sun Mar 24 09:03:04 2013] [error] [client 5.9.66.71] File does not exist: /home/qaroot/mybooktype/mybook/export/b1
    settings.py

    Rights:
    4 drwxrwxrwx 2 www-data www-data  4096 Mar 24 09:24 export  (/home/qaroot/mybooktype/mybook/export)

    2)  I see that in every 5 seconds, when someone is connected, there is an entry in the log even when the user do nothing. 
    How to avoid that, so that we generate an entry only upon activity?

    Ex:
    187.60.224.18 - - [24/Mar/2013:08:26:36 -0600] "POST /booktype/_sputnik/ HTTP/1.1" 200 303 "http://.....b1/_edit/" "Moz..."
    187.60.224.18 - - [24/Mar/2013:08:26:41 -0600] "POST /booktype/_sputnik/ HTTP/1.1" 200 303 "http://.....b1/_edit/" "Moz..."

    3) When there is no one logged in the system, users can see book, groups and people. Is there a way to only show those information for people logged in.

    Thank you very much for your support,
    Marcelo
    Post edited by Marcelo Aragao at 2013-03-24 10:35:09
  • Hi Marcelo!

    1) Looking at the log files in (2) I would say this is what you need to do. Edit settings.py and change this:
        THIS_BOOKI_SERVER = '187.60.224.18/booktype'

        I assume that 187.60.224.18 in this example is the public IP for your server. Booktype instance must be accessable from outside for objavi.booktype.pro to fetch the content of the book. 

    2) It is a collaborative interface so the connections are happening to fetch and send needed information. Table of Contents is up to date, list of online users, attachments and etc... It will be hard to escape from this (until websocket implementation for this comes).

    3) There is nothing in the configuration at the moment which would only allow online users to see specific info. Some of the things could be easy to handle without any need for code change. For instance, locally modify templates and only show certain options and info is user is signed. That would more part of what you asked. Anonymous would still be able to access book or user info if they would somehow know their url and manually enter it. 

    Aco


  • Hi Aco,

    Thanks for looking at it and providing clarifications for the questions. 
    I followed your recommendation but it is still the same thing
    My server public IP is 12.234.678.90 and [111.11.111.11 or 2.2.22.22] are clients  (so I am reacheable from outside). 

    What I have now is:
    THIS_BOOKI_SERVER = '12.234.678.90:8080'
    #before => THIS_BOOKI_SERVER = 'apps.eee.com:8080'

    BOOKI_URL = http://12.234.678.90:8080'

    Any idea why I still have the Unknown error while trying to publish this book. 
    I still get the same LOG errors(anything wrong with Phython 2.7?):
    * 2.2.22.22 - - [24/Mar/2013:18:34:32 -0500] "GET /export/ef04/export HTTP/1.1" 404 516 "-" "Python-urllib/2.7"
    * [Sun Mar 24 18:34:32 2013] [error] [client 5.9.66.71] File does not exist: /home/qaroot/mybooktype/mybook/export/ef-04 

    Thanks,
    Marcelo
    Post edited by Marcelo Aragao at 2013-03-24 20:19:08
  • Hi Marcelo!

    Put this as your config (you are missing booktype at the end) and it should work:
     THIS_BOOKI_SERVER ='76.187.190.29:8080/booktype'
      BOOKI_URL = 'http://76.187.190.29:8080/booktype'

    Aco
  • Hi Aco, 

    YOU ARE RIGHT !!!!
    This was the problem.

    Thanks thanks thanks!!!

    ps.Could you edit you comment removing my IP?
    Post edited by Marcelo Aragao at 2013-03-24 20:22:07