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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Calibre Web
  3. Thumbnail cache not writeable?

Thumbnail cache not writeable?

Scheduled Pinned Locked Moved Solved Calibre Web
10 Posts 6 Posters 1.5k Views 7 Watching
  • 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.
  • drubbD Offline
    drubbD Offline
    drubb
    wrote on last edited by
    #1

    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!

    jdaviescoatesJ 1 Reply Last reply
    1
    • drubbD drubb

      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!

      jdaviescoatesJ Online
      jdaviescoatesJ Online
      jdaviescoates
      wrote on last edited by
      #2

      @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
      0
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #4

          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?

          jdaviescoatesJ 1 Reply Last reply
          0
          • nebulonN nebulon marked this topic as a question on
          • nebulonN nebulon

            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?

            jdaviescoatesJ Online
            jdaviescoatesJ Online
            jdaviescoates
            wrote on last edited by
            #5

            @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

            robiR 1 Reply Last reply
            0
            • jdaviescoatesJ jdaviescoates

              @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)

              robiR Offline
              robiR Offline
              robi
              wrote on last edited by
              #6

              @jdaviescoates of course not, it's RO.

              Conscious tech

              1 Reply Last reply
              0
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #7

                Is there any more info on this and can someone reproduce this?

                1 Reply Last reply
                0
                • hpz24H Online
                  hpz24H Online
                  hpz24
                  wrote last edited by hpz24
                  #8

                  Hi,
                  I got the same error after installing the calibre-web instance yesterday and moving(!) my existing database to the cloudron instance.
                  And yes, the cache directory does not exist for me either.

                  May 24 08:13:29 OSError: [Errno 30] Read-only file system: '/app/code/calibre-web/cps/cache'
                  May 24 08:13:29 OSError: [Errno 30] Read-only file system: '/app/code/calibre-web/cps/cache'
                  May 24 08:13:29 OSError: [Errno 30] Read-only file system: '/app/code/calibre-web/cps/cache'
                  May 24 08:13:29 Traceback (most recent call last):
                  May 24 08:13:29 Traceback (most recent call last):
                  May 24 08:13:29 [2025-05-24 06:13:29,905] INFO {cps.fs:41} Failed to create path /app/code/calibre-web/cps/cache (Permission denied).
                  

                  image.png

                  1 Reply Last reply
                  0
                  • girishG Do not disturb
                    girishG Do not disturb
                    girish
                    Staff
                    wrote last edited by
                    #9

                    @hpz24 I couldn't reproduce it myself but there is a CACHE_DIR env var to be set . It defaults to BASE_DIR/cps/cache per upstream code. I have set this variable in the latest package, can you update and check?

                    1 Reply Last reply
                    2
                    • hpz24H Online
                      hpz24H Online
                      hpz24
                      wrote last edited by
                      #10

                      Works perfectly!
                      All thumbnails are there, thx a lot! 🙂

                      1 Reply Last reply
                      3
                      • J joseph has marked this topic as solved
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search