Git Product home page Git Product logo

Comments (2)

akx avatar akx commented on August 10, 2024

Copy-pasting the traceback for future reference:


File "/home/respa/venv/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/respa/venv/lib/python3.4/site-packages/django/views/generic/base.py" in view
  71.             return self.dispatch(request, *args, **kwargs)
File "/home/respa/venv/lib/python3.4/site-packages/django/views/generic/base.py" in dispatch
  89.         return handler(request, *args, **kwargs)
File "./resources/views/images.py" in get
  58.                 'detail': True,
File "/home/respa/venv/lib/python3.4/site-packages/easy_thumbnails/files.py" in get_thumbnail
  509.         thumbnail = self.get_existing_thumbnail(thumbnail_options)
File "/home/respa/venv/lib/python3.4/site-packages/easy_thumbnails/files.py" in get_existing_thumbnail
  475.             exists = self.thumbnail_exists(filename)
File "/home/respa/venv/lib/python3.4/site-packages/easy_thumbnails/files.py" in thumbnail_exists
  588.                 self.source_storage, self.name)
File "/home/respa/venv/lib/python3.4/site-packages/easy_thumbnails/utils.py" in get_modified_time
  146.         modified_time = storage.modified_time(name)
File "/home/respa/venv/lib/python3.4/site-packages/django/core/files/storage.py" in modified_time
  325.         return datetime.fromtimestamp(os.path.getmtime(self.path(name)))
File "/home/respa/venv/lib/python3.4/genericpath.py" in getmtime
  55.     return os.stat(filename).st_mtime

Exception Type: UnicodeEncodeError at /resource_image/25
Exception Value: 'ascii' codec can't encode character '\xe4' in position 38: ordinal not in range(128)

(filename equals '/home/respa/media/resource_images/Ryhmätyötila_yRdsWTi.JPG'`)

I've seen this before... Could whoever is in charge of the server please make sure the process running the app has LC_CTYPE=en_US.UTF-8 (or more broadly LANG=en_US.UTF-8) set for the file system encoding? If it already is so, I'll have to dig in deeper.

from respa.

juyrjola avatar juyrjola commented on August 10, 2024

Setting LANG in the uwsgi config did indeed fix it. Thanks!

What an interesting bug. It didn't manifest before, because I've usually restarted uwsgi manually, and LANG was then inherited from my environment. When we rebooted the server today, the variable was not set, so the bug bit.

The setting is now included in our Ansible template.

from respa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.