[Server-devel] Gutenberg .epubs not viewable from Internet-in-a-Box?

Adam Holt holt at laptop.org
Thu Apr 23 20:53:06 EDT 2015


On Thu, Apr 23, 2015 at 3:49 PM, Adam Holt <holt at laptop.org> wrote:

> Errors below: one Haiti volunteer is trying to download .epub books from
> IIAB's Gutenberg,  He loaded Flask (Python web framework) thinking that
> would help but it did not.  Are Tony's earlier tips below the best way
> forward?
>
> "The default is show html online. In knowledge/modules there is also a
> directory of epub. I think I patched the code in iiab to default to the
> epub file. This gets downloaded automatically by the Browse activity to
> the Journal...The Gutenberg books accessed from Rachel are the text
> versions...I set it up so that the epub versions are downloaded."
>

Volunteer has given me more details on the error below.  He says "I had
Mint 17.1 running on the laptop and on the box we have IIAB on...these
errors are from the laptop.  We are using Firefox for the web browser...I
added Flask after the fact to the client but I had Flask running on the
IIAB box.  I will be happy to look closer if you need anything."  (And
apologies this is not explicitly an XSCE question, but they may use that in
future.)

IOError
IOError: [Errno 2] No such file or directory:
'/usr/local/lib/python2.7/dist-packages/iiab/knowledge/modules/gutenberg-epub-images/91/pg91.epub'
 Traceback *(most recent call last)*

   -  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line
   *1836*, in __call__

   return self.wsgi_app(environ, start_response)

    -  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line
   *1820*, in wsgi_app

   response = self.make_response(self.handle_exception(e))

    -  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line
   *1403*, in handle_exception

   reraise(exc_type, exc_value, tb)

    -  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line
   *1817*, in wsgi_app

   response = self.full_dispatch_request()

    -  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line
   *1477*, in full_dispatch_request

   rv = self.handle_user_exception(e)

    -  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line
   *1381*, in handle_user_exception

   reraise(exc_type, exc_value, tb)

    -  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line
   *1475*, in full_dispatch_request

   rv = self.dispatch_request()

    -  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line
   *1461*, in dispatch_request

   return self.view_functions[rule.endpoint](**req.view_args)

    -  File
   "/usr/local/lib/python2.7/dist-packages/iiab/gutenberg_content_views.py",
   line *42*, in epub_ext

   return epub(pgid)

    -  File
   "/usr/local/lib/python2.7/dist-packages/iiab/gutenberg_content_views.py",
   line *37*, in epub

   return send_file(epub_path, mimetype='application/epub+zip')

    -  File "/usr/local/lib/python2.7/dist-packages/flask/helpers.py", line
   *520*, in send_file

   file = open(filename, 'rb')


IOError: [Errno 2] No such file or directory:
'/usr/local/lib/python2.7/dist-packages/iiab/knowledge/modules/gutenberg-epub-images/91/pg91.epub'

-- 
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/server-devel/attachments/20150423/a729fe54/attachment.html>


More information about the Server-devel mailing list