why my server terminal doesnt show error?

Viewed 60

I am connected to my VPS (Ubuntu) via SSH. I use Django, where I process 1000's of images via Django-imagekit ( PIL ). but for some reason, it is not generating an error it just stops/terminates there. it shows all other print commands and everything.

yes, I tried 'try and except' but it doesn't work, it just terminates at 'try' only.

CODE:

from imagekit import ImageSpec
from imagekit.processors import ResizeToFit

class Thumbnail(ImageSpec):
        processors = [ResizeToFit(1200)]
        format = 'WEBP'
        options = {'quality': 90}

Main_image = open('path/to/image.jpg','rb')
Preview_gen = Thumbnail(source=Main_image)
Preview = Preview_gen.generate()

Error while executing the last line

( but works fine on my local machine )

Specs:

  • Ubuntu Linux 18.04.2
  • Python==3.6.9
  • Django==3.0.7
  • Pillow==8.2.0
  • psycopg2==2.8.6
  • psycopg2-binary==2.8.6
  • django-imagekit==4.0.2

anyone any idea?

error causing image Wallpaper, .jpg, 9600 x 5598

this is the problem for very few images

0 Answers
Related