Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Unsolved Thumbnail cache not writeable?

    Calibre Web
    4
    6
    39
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • drubb
      drubb last edited by

      I've installed a new instance of Calibre Web and copied my existing Calibre library to /library. This works fine so far. However, when I upload new books, no thumbnails can be generated. Here's what I can see in the logs:

      [2023-01-03 16:33:19,257]  INFO {cps.fs:41} Failed to create path /app/code/calibre-web/cps/cache (Permission denied).
      [2023-01-03 16:33:19,374]  INFO {cps.fs:41} Failed to create path /app/code/calibre-web/cps/cache (Permission denied).
      [2023-01-03 16:39:24,997]  INFO {cps.fs:41} Failed to create path /app/code/calibre-web/cps/cache (Permission denied).
      [2023-01-03 16:39:24,998] ERROR {cps:1457} Exception on /cover/1921/sm [GET]
      Traceback (most recent call last):
        File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
          response = self.full_dispatch_request()
        File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1518, in full_dispatch_request
          rv = self.handle_user_exception(e)
        File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
          rv = self.dispatch_request()
        File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
          return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
        File "/app/code/calibre-web/cps/usermanagement.py", line 35, in decorated_view
          return login_required(func)(*args, **kwargs)
        File "/usr/local/lib/python3.8/dist-packages/flask_login/utils.py", line 303, in decorated_view
          return current_app.ensure_sync(func)(*args, **kwargs)
        File "/app/code/calibre-web/cps/web.py", line 1122, in get_cover
          return get_book_cover(book_id, cover_resolution)
        File "/app/code/calibre-web/cps/helper.py", line 705, in get_book_cover
          return get_book_cover_internal(book, use_generic_cover_on_failure=True, resolution=resolution)
        File "/app/code/calibre-web/cps/helper.py", line 722, in get_book_cover_internal
          if cache.get_cache_file_exists(thumbnail.filename, CACHE_TYPE_THUMBNAILS):
        File "/app/code/calibre-web/cps/fs.py", line 69, in get_cache_file_exists
          path = self.get_cache_file_path(filename, cache_type)
        File "/app/code/calibre-web/cps/fs.py", line 66, in get_cache_file_path
          return join(self.get_cache_file_dir(filename, cache_type), filename) if filename else None
        File "/app/code/calibre-web/cps/fs.py", line 55, in get_cache_file_dir
          path = join(self.get_cache_dir(cache_type), filename[:2])
        File "/app/code/calibre-web/cps/fs.py", line 39, in get_cache_dir
          makedirs(self._cache_dir)
        File "/usr/lib/python3.8/os.py", line 223, in makedirs
          mkdir(name, mode)
      OSError: [Errno 30] Read-only file system: '/app/code/calibre-web/cps/cache'
      

      Seems that Calibre Web wants to cache thumbnails in /app/code/calibre-web/cps/cache, and afaik the code folder for Cloudron apps isn't writeable.

      Are there any settings to choose the cache location or disable thumbnail caching?

      Generating original cover images works fine, e.g. /cover/1922/og exists, but cover/1922/sm doesn't.

      Thx a lot!

      jdaviescoates 1 Reply Last reply Reply Quote 1
      • jdaviescoates
        jdaviescoates @drubb last edited by

        @drubb I think I've hit this issue previously, can't fully remember but I think it was something to do with folder/file permissions - have a look in the File Manager for your Calibre App to check they've all got the correct permissions (Owner should be cloudron)

        I use Cloudron with Gandi & Hetzner

        1 Reply Last reply Reply Quote 0
        • nebulon
          nebulon Staff last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by

            I tried to reproduce this, but I couldn't. At least in my instances this /app/code/calibre-web/cps/cache directory does not exist and is also not attempted to be created. But I only have pdfs currently to test with, so maybe this is related specific formats?

            jdaviescoates 1 Reply Last reply Reply Quote 0
            • Topic has been marked as a question  nebulon nebulon 
            • jdaviescoates
              jdaviescoates @nebulon last edited by

              @nebulon said in Thumbnail cache not writeable?:

              I tried to reproduce this, but I couldn't. At least in my instances this /app/code/calibre-web/cps/cache directory does not exist and is also not attempted to be created. But I only have pdfs currently to test with, so maybe this is related specific formats?

              Just checked and it doesn't exist in mine either (with lots of epubs, mobis and pdfs)

              I use Cloudron with Gandi & Hetzner

              robi 1 Reply Last reply Reply Quote 0
              • robi
                robi @jdaviescoates last edited by

                @jdaviescoates of course not, it's RO.

                Life of Advanced Technology

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB