objavi installation error
  • Hi,

    I tried to install objavi but no luck so far, here's my logfile:


    Starting request for /objavi.cgi
    argument 'allow-breaks' is not valid ('off')
    argument 'page-numbers' is not valid ('auto')
    argument 'rotate' is not valid ('off')
    argument 'grey_scale' is not valid ('off')
    argument 'server' is not valid ('booktype.agromisa.org')
    effective query is:
    {'engine': 'webkit', 'lulu_password': '', 'license': 'CC-BY', 'pdf_type': 'book', 'output_format': 'mobi', 'destination': 'nowhere', 'lulu_user': '', 'lulu_api_key': '', 'lulu_access': 'private', 'book': 'chantal-test', 'lulu_binding_type': 'perfect', 'embed-fonts': 'yes', 'lulu_paper_type': 'publisher-grade', 'lulu_language': 'EN', 'max-age': '0', 'booksize': 'COMICBOOK', 'css': '.objavi-subsection{ \n  display: block; \n  page-break-before: always; \n/* page-break-after: always;*/ \n  text-transform: uppercase; \n  font-size: 20pt; \n} \n\nbody .objavi-subsection:first-child{ \n  page-break-before: avoid; \n} \n\n\n.objavi-subsection .initial { \n  font-size: 1em; \n  color: #000; \n} \n\n.objavi-subsection-heading { \n  font-size: 20pt; \n  text-align: center; \n  line-height: 300px; \n  font-weight: normal; \n} \n\n\nh1 { \n  page-break-before: always; \n} \n\n\ntable { \n  float: none; \n} \n\nh1.frontpage{ \n  page-break-after:always; \n  margin-top:70%; \n  font-size: 20pt; \n  text-align: center; \n  page-break-before: avoid; \n  font-weight: normal; \n} \n\ndiv.copyright{ \n  padding: 1em; \n} \n/* TOC ******************************/ \ntable { \n  float: none; \n} \n\ntable.toc { \n  font-size: 1.1em; \n  width: 95%; \n} \n\ntable.toc td{ \n  vertical-align:top \n  padding-left: 0.5em; \n} \n\ntd.chapter { \n  padding: 0 0.5em; \n  text-align: right; \n} \n\ntable.toc td.pagenumber { \n  text-align: right; \n  vertical-align:bottom; \n} \n\ntd.section { \n  padding-top: 1.1em; \n  font-weight: bold; \n} \n/* End TOC **************************/ \n\n\n\npre { \n  overflow: hidden; \n  white-space: pre-wrap; \n} \n\n\nh1, h2, h3, h4, h5, h6{ \n  page-break-after: avoid; \n  page-break-inside: avoid; \n} \n\n\n.page-break{ \n  page-break-before: always; \n  height: 7em; \n  display: block; \n} \n\na { \n  word-wrap: break-word; \n} \n\n.objavi-no-page-break { \n  page-break-inside: avoid; \n} \n\n/*To force a blank page it is sometimes necessary to add unseen \n content. Display:none and visibility: hidden do not work -- the \n renderer realises that they are not there and skips the page. So we \n add a tiny bit of text beyond the margin of the page. \n*/ \n.unseen{ \n  z-index: -66; \n  margin-left: -1000pt; \n}BODY, P {\n    font-family: Fontin_Sans;\n    font-size: 10pt;\n}\nH1 {\n    font-family: Fontin_Sans;\n    font-size: 14pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nH2 {\n    font-family: Fontin_Sans;\n    font-size: 12pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nH3 {\n    font-family: Fontin_Sans;\n    font-size: 10pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nPRE {\n    font-family: Courier;\n    font-size: 10pt;\n}\n', 'mode': 'web'}
    Traceback (most recent call last):
      File "/var/www/objavi/htdocs/objavi.cgi", line 478, in <module>
        main()
      File "/var/www/objavi/htdocs/objavi.cgi", line 471, in main
        output_function(args)
      File "/var/www/objavi/htdocs/objavi.cgi", line 330, in mode_book
        context = Context(args)
      File "/var/www/objavi/htdocs/objavi.cgi", line 188, in __init__
        self.bookname = make_book_name(self.bookid, self.server, extension)
      File "/var/www/objavi/objavi/book_utils.py", line 98, in make_book_name
        lang = guess_lang(server, book)
      File "/var/www/objavi/objavi/book_utils.py", line 109, in guess_lang
        lang = get_server_defaults(server).get('lang')
    AttributeError: 'NoneType' object has no attribute 'get'
    Starting request for /objavi.cgi
    argument 'allow-breaks' is not valid ('off')
    argument 'page-numbers' is not valid ('auto')
    argument 'rotate' is not valid ('off')
    argument 'grey_scale' is not valid ('off')
    argument 'server' is not valid ('objavi.agromisa.org')
    effective query is:
    {'engine': 'webkit', 'lulu_password': '', 'license': 'CC-BY', 'pdf_type': 'book', 'output_format': 'mobi', 'destination': 'nowhere', 'lulu_user': '', 'lulu_api_key': '', 'lulu_access': 'private', 'book': 'chantal-test', 'lulu_binding_type': 'perfect', 'embed-fonts': 'yes', 'lulu_paper_type': 'publisher-grade', 'lulu_language': 'EN', 'max-age': '0', 'booksize': 'COMICBOOK', 'css': '.objavi-subsection{ \n  display: block; \n  page-break-before: always; \n/* page-break-after: always;*/ \n  text-transform: uppercase; \n  font-size: 20pt; \n} \n\nbody .objavi-subsection:first-child{ \n  page-break-before: avoid; \n} \n\n\n.objavi-subsection .initial { \n  font-size: 1em; \n  color: #000; \n} \n\n.objavi-subsection-heading { \n  font-size: 20pt; \n  text-align: center; \n  line-height: 300px; \n  font-weight: normal; \n} \n\n\nh1 { \n  page-break-before: always; \n} \n\n\ntable { \n  float: none; \n} \n\nh1.frontpage{ \n  page-break-after:always; \n  margin-top:70%; \n  font-size: 20pt; \n  text-align: center; \n  page-break-before: avoid; \n  font-weight: normal; \n} \n\ndiv.copyright{ \n  padding: 1em; \n} \n/* TOC ******************************/ \ntable { \n  float: none; \n} \n\ntable.toc { \n  font-size: 1.1em; \n  width: 95%; \n} \n\ntable.toc td{ \n  vertical-align:top \n  padding-left: 0.5em; \n} \n\ntd.chapter { \n  padding: 0 0.5em; \n  text-align: right; \n} \n\ntable.toc td.pagenumber { \n  text-align: right; \n  vertical-align:bottom; \n} \n\ntd.section { \n  padding-top: 1.1em; \n  font-weight: bold; \n} \n/* End TOC **************************/ \n\n\n\npre { \n  overflow: hidden; \n  white-space: pre-wrap; \n} \n\n\nh1, h2, h3, h4, h5, h6{ \n  page-break-after: avoid; \n  page-break-inside: avoid; \n} \n\n\n.page-break{ \n  page-break-before: always; \n  height: 7em; \n  display: block; \n} \n\na { \n  word-wrap: break-word; \n} \n\n.objavi-no-page-break { \n  page-break-inside: avoid; \n} \n\n/*To force a blank page it is sometimes necessary to add unseen \n content. Display:none and visibility: hidden do not work -- the \n renderer realises that they are not there and skips the page. So we \n add a tiny bit of text beyond the margin of the page. \n*/ \n.unseen{ \n  z-index: -66; \n  margin-left: -1000pt; \n}BODY, P {\n    font-family: Fontin_Sans;\n    font-size: 10pt;\n}\nH1 {\n    font-family: Fontin_Sans;\n    font-size: 14pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nH2 {\n    font-family: Fontin_Sans;\n    font-size: 12pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nH3 {\n    font-family: Fontin_Sans;\n    font-size: 10pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nPRE {\n    font-family: Courier;\n    font-size: 10pt;\n}\n', 'mode': 'web'}
    Traceback (most recent call last):
      File "/var/www/objavi/htdocs/objavi.cgi", line 478, in <module>
        main()
      File "/var/www/objavi/htdocs/objavi.cgi", line 471, in main
        output_function(args)
      File "/var/www/objavi/htdocs/objavi.cgi", line 330, in mode_book
        context = Context(args)
      File "/var/www/objavi/htdocs/objavi.cgi", line 188, in __init__
        self.bookname = make_book_name(self.bookid, self.server, extension)
      File "/var/www/objavi/objavi/book_utils.py", line 98, in make_book_name
        lang = guess_lang(server, book)
      File "/var/www/objavi/objavi/book_utils.py", line 109, in guess_lang
        lang = get_server_defaults(server).get('lang')
    AttributeError: 'NoneType' object has no attribute 'get'
    Starting request for /objavi.cgi
    argument 'allow-breaks' is not valid ('off')
    argument 'page-numbers' is not valid ('auto')
    argument 'rotate' is not valid ('off')
    argument 'grey_scale' is not valid ('off')
    argument 'server' is not valid ('objavi.agromisa.org')
    effective query is:
    {'engine': 'webkit', 'lulu_password': '', 'license': 'CC-BY', 'pdf_type': 'book', 'output_format': 'mobi', 'destination': 'nowhere', 'lulu_user': '', 'lulu_api_key': '', 'lulu_access': 'private', 'book': 'chantal-test', 'lulu_binding_type': 'perfect', 'embed-fonts': 'yes', 'lulu_paper_type': 'publisher-grade', 'lulu_language': 'EN', 'max-age': '0', 'booksize': 'COMICBOOK', 'css': '.objavi-subsection{ \n  display: block; \n  page-break-before: always; \n/* page-break-after: always;*/ \n  text-transform: uppercase; \n  font-size: 20pt; \n} \n\nbody .objavi-subsection:first-child{ \n  page-break-before: avoid; \n} \n\n\n.objavi-subsection .initial { \n  font-size: 1em; \n  color: #000; \n} \n\n.objavi-subsection-heading { \n  font-size: 20pt; \n  text-align: center; \n  line-height: 300px; \n  font-weight: normal; \n} \n\n\nh1 { \n  page-break-before: always; \n} \n\n\ntable { \n  float: none; \n} \n\nh1.frontpage{ \n  page-break-after:always; \n  margin-top:70%; \n  font-size: 20pt; \n  text-align: center; \n  page-break-before: avoid; \n  font-weight: normal; \n} \n\ndiv.copyright{ \n  padding: 1em; \n} \n/* TOC ******************************/ \ntable { \n  float: none; \n} \n\ntable.toc { \n  font-size: 1.1em; \n  width: 95%; \n} \n\ntable.toc td{ \n  vertical-align:top \n  padding-left: 0.5em; \n} \n\ntd.chapter { \n  padding: 0 0.5em; \n  text-align: right; \n} \n\ntable.toc td.pagenumber { \n  text-align: right; \n  vertical-align:bottom; \n} \n\ntd.section { \n  padding-top: 1.1em; \n  font-weight: bold; \n} \n/* End TOC **************************/ \n\n\n\npre { \n  overflow: hidden; \n  white-space: pre-wrap; \n} \n\n\nh1, h2, h3, h4, h5, h6{ \n  page-break-after: avoid; \n  page-break-inside: avoid; \n} \n\n\n.page-break{ \n  page-break-before: always; \n  height: 7em; \n  display: block; \n} \n\na { \n  word-wrap: break-word; \n} \n\n.objavi-no-page-break { \n  page-break-inside: avoid; \n} \n\n/*To force a blank page it is sometimes necessary to add unseen \n content. Display:none and visibility: hidden do not work -- the \n renderer realises that they are not there and skips the page. So we \n add a tiny bit of text beyond the margin of the page. \n*/ \n.unseen{ \n  z-index: -66; \n  margin-left: -1000pt; \n}BODY, P {\n    font-family: Fontin_Sans;\n    font-size: 10pt;\n}\nH1 {\n    font-family: Fontin_Sans;\n    font-size: 14pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nH2 {\n    font-family: Fontin_Sans;\n    font-size: 12pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nH3 {\n    font-family: Fontin_Sans;\n    font-size: 10pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nPRE {\n    font-family: Courier;\n    font-size: 10pt;\n}\n', 'mode': 'web'}
    Traceback (most recent call last):
      File "/var/www/objavi/htdocs/objavi.cgi", line 478, in <module>
        main()
      File "/var/www/objavi/htdocs/objavi.cgi", line 471, in main
        output_function(args)
      File "/var/www/objavi/htdocs/objavi.cgi", line 330, in mode_book
        context = Context(args)
      File "/var/www/objavi/htdocs/objavi.cgi", line 188, in __init__
        self.bookname = make_book_name(self.bookid, self.server, extension)
      File "/var/www/objavi/objavi/book_utils.py", line 98, in make_book_name
        lang = guess_lang(server, book)
      File "/var/www/objavi/objavi/book_utils.py", line 109, in guess_lang
        lang = get_server_defaults(server).get('lang')
    AttributeError: 'NoneType' object has no attribute 'get'


    Post edited by chantal rosmuller at 2012-10-12 05:42:07
  • 6 Comments sorted by
  • When I put this in config.py:

    DEFAULT_SERVER = 'www.booki.cc'
    DEFAULT_BOOKI_SERVER = 'www.booki.cc'

    I get a broken download link

    When I put objavi.agromisa.org (our url) I get

    argument 'server' is not valid ('objavi.agromisa.org')





  • Sorry a little more information:

    When I put this in config.py:



    DEFAULT_SERVER = 'www.booki.cc'

    DEFAULT_BOOKI_SERVER = 'www.booki.cc'



    I get a broken download link
    to www.booki.cc


    When I put this in config.oy:

    DEFAULT_SERVER = 'objavi.agromisa.org'

    DEFAULT_BOOKI_SERVER = 'objavi.agromisa.org'



    I get an error in booktype and in the objavi log:

    argument 'server' is not valid ('objavi.agromisa.org')




    and when I put this:

    DEFAULT_SERVER = 'www.booki.cc'
    DEFAULT_BOOKI_SERVER = 'objavi.agromisa.org'

    I get a download link to objavi.agromisa.org but the book is not there
  • Hello.

    So, objavi.agromisa.org is the Objavi host, booktype.agromisa.org is the Booktype host. In that case, in Objavi's config.py, you have to have an entry for booktype.agromisa.org in SERVER_DEFAULTS. In Booktype's settings.py, THIS_BOOKI_SERVER should be set to "booktype.agromisa.org".

    - Borko
  • Thanks Borko!

    It helped, but I have a new error now.

    Starting request for /objavi.cgi
    argument 'allow-breaks' is not valid ('off')
    argument 'page-numbers' is not valid ('auto')
    argument 'rotate' is not valid ('off')
    argument 'grey_scale' is not valid ('off')
    argument 'server' is not valid ('booktype.agromisa.org')
    effective query is:
    {'engine': 'webkit', 'lulu_password': '', 'license': 'CC-BY', 'pdf_type': 'book', 'output_format': 'mobi', 'destination': 'nowhere', 'lulu_user': '', 'lulu_api_key': '', 'lulu_access': 'private', 'book': 'chantal-test', 'lulu_binding_type': 'perfect', 'embed-fonts': 'yes', 'lulu_paper_type': 'publisher-grade', 'lulu_language': 'EN', 'max-age': '0', 'booksize': 'COMICBOOK', 'css': '.objavi-subsection{ \n  display: block; \n  page-break-before: always; \n/* page-break-after: always;*/ \n  text-transform: uppercase; \n  font-size: 20pt; \n} \n\nbody .objavi-subsection:first-child{ \n  page-break-before: avoid; \n} \n\n\n.objavi-subsection .initial { \n  font-size: 1em; \n  color: #000; \n} \n\n.objavi-subsection-heading { \n  font-size: 20pt; \n  text-align: center; \n  line-height: 300px; \n  font-weight: normal; \n} \n\n\nh1 { \n  page-break-before: always; \n} \n\n\ntable { \n  float: none; \n} \n\nh1.frontpage{ \n  page-break-after:always; \n  margin-top:70%; \n  font-size: 20pt; \n  text-align: center; \n  page-break-before: avoid; \n  font-weight: normal; \n} \n\ndiv.copyright{ \n  padding: 1em; \n} \n/* TOC ******************************/ \ntable { \n  float: none; \n} \n\ntable.toc { \n  font-size: 1.1em; \n  width: 95%; \n} \n\ntable.toc td{ \n  vertical-align:top \n  padding-left: 0.5em; \n} \n\ntd.chapter { \n  padding: 0 0.5em; \n  text-align: right; \n} \n\ntable.toc td.pagenumber { \n  text-align: right; \n  vertical-align:bottom; \n} \n\ntd.section { \n  padding-top: 1.1em; \n  font-weight: bold; \n} \n/* End TOC **************************/ \n\n\n\npre { \n  overflow: hidden; \n  white-space: pre-wrap; \n} \n\n\nh1, h2, h3, h4, h5, h6{ \n  page-break-after: avoid; \n  page-break-inside: avoid; \n} \n\n\n.page-break{ \n  page-break-before: always; \n  height: 7em; \n  display: block; \n} \n\na { \n  word-wrap: break-word; \n} \n\n.objavi-no-page-break { \n  page-break-inside: avoid; \n} \n\n/*To force a blank page it is sometimes necessary to add unseen \n content. Display:none and visibility: hidden do not work -- the \n renderer realises that they are not there and skips the page. So we \n add a tiny bit of text beyond the margin of the page. \n*/ \n.unseen{ \n  z-index: -66; \n  margin-left: -1000pt; \n}BODY, P {\n    font-family: Fontin_Sans;\n    font-size: 10pt;\n}\nH1 {\n    font-family: Fontin_Sans;\n    font-size: 14pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nH2 {\n    font-family: Fontin_Sans;\n    font-size: 12pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nH3 {\n    font-family: Fontin_Sans;\n    font-size: 10pt;\n    text-transform: uppercase;\n    font-weight: heavy;\n}\nPRE {\n    font-family: Courier;\n    font-size: 10pt;\n}\n', 'mode': 'web'}
    templates/nowhere.txt
    text/plain; charset=utf-8
    nowhere
    sync
    in get_watchers. method 'sync', callback None, destination 'nowhere'
    watchers are set([<bound method Context.log_notifier of <__main__.Context object at 0x14f5f10>>])
    *** Starting new book chantaltest-en-2012.10.18-11.32.12.pdf ***
    notify_watcher called with 'start'
    ******* got message "start"
    Traceback (most recent call last):
      File "/var/www/objavi/htdocs/objavi.cgi", line 478, in <module>
        main()
      File "/var/www/objavi/htdocs/objavi.cgi", line 471, in main
        output_function(args)
      File "/var/www/objavi/htdocs/objavi.cgi", line 338, in mode_book
        page_number_style=args.get('page-numbers'),
      File "/var/www/objavi/objavi/fmbook.py", line 184, in __init__
        blob, self.bookizip_file = fetch_zip(server, book, save=True, max_age=max_age)
      File "/var/www/objavi/objavi/fmbook.py", line 1346, in fetch_zip
        interface = get_server_defaults(server).get('interface', 'Booki')
      File "/var/www/objavi/objavi/book_utils.py", line 93, in get_server_defaults
        if fnmatch.fnmatch(server, pattern):
      File "/usr/lib/python2.7/fnmatch.py", line 43, in fnmatch
        return fnmatchcase(name, pat)
      File "/usr/lib/python2.7/fnmatch.py", line 79, in fnmatchcase
        return _cache[pat].match(name) is not None
    TypeError: expected string or buffer

  • Sorry, I fixed that last error myself, it was a typo (a space ). Almost there! Now I get this error:

    ******* got message "start"
    fetching zip from http://booktype.agromisa.org/export/chantal-test/export
    HTTPError 'HTTP Error 404: Not Found' trying to fetch 'http://booktype.agromisa.org/export/chantal-test/export'
    Traceback (most recent call last):
      File "/var/www/objavi/objavi/fmbook.py", line 184, in __init__
        blob, self.bookizip_file = fetch_zip(server, book, save=True, max_age=max_age)
      File "/var/www/objavi/objavi/fmbook.py", line 1366, in fetch_zip
        blob = url_fetch(url)
      File "/var/www/objavi/objavi/book_utils.py", line 199, in url_fetch
        f = urlopen(url)
      File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "/usr/lib/python2.7/urllib2.py", line 406, in open
        response = meth(req, response)
      File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
        'http', request, response, code, msg, hdrs)
      File "/usr/lib/python2.7/urllib2.py", line 444, in error
        return self._call_chain(*args)
      File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    HTTPError: HTTP Error 404: Not Found
    notify_watcher called with 'ERROR:
     Couldn't get 'http://booktype.agromisa.org/export/chantal-test/export'
     404 Not Found'
    ******* got message "ERROR:
     Couldn't get 'http://booktype.agromisa.org/export/chantal-test/export'
     404 Not Found"

    I understand the 404 error because the url is http://booktype.agromisa.org:8000 and not http://booktype.agromisa.org but when I change it in config.py in SERVER_DEFAULTS it doesn't work:

    argument 'server' is not valid ('booktype.agromisa.org')

  • You also have to put "booktype.agromisa.org:8000" to THIS_BOOKI_SERVER in Booktype's settings.py file.