Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

UnicodeEncodeError: 'ascii' codec can't encode characters in position 72-73: ordinal not in range(128)

Open
#113 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start in slideshow/lib/assembler/image.py at upload(), then trace the call from slideshow/lib/slide.py through assemble() and create(). Reproduce the submit flow with an image filename containing non-ASCII characters and inspect where slide.src_path(src.filename) is opened. Done means that upload no longer raises the reported UnicodeEncodeError.

Written by the indexing model from the issue text.

Description

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/cherrypy/_cprequest.py", line 656, in respond
response.body = self.handler()
File "/usr/lib64/python2.7/site-packages/cherrypy/lib/encoding.py", line 188, in call
self.body = self.oldhandler(_args, *_kwargs)
File "/usr/lib64/python2.7/site-packages/cherrypy/_cpdispatch.py", line 34, in call
return self.callable(_self.args, *_self.kwargs)
File "/home/ext/slideshow-src/slideshow/pages/slides.py", line 198, in submit
s = slide.create(cherrypy.thread_data.db, assembler, kwargs)
File "/home/ext/slideshow-src/slideshow/lib/slide.py", line 162, in create
slide._data = json.loads(slide.assemble(params))
File "/home/ext/slideshow-src/slideshow/lib/slide.py", line 54, in assemble
return json.dumps(self.assembler.assemble(self, **params))
File "/home/ext/slideshow-src/slideshow/lib/assembler/image.py", line 25, in assemble
return self.upload(slide, filename)
File "/home/ext/slideshow-src/slideshow/lib/assembler/image.py", line 28, in upload
dst = open(slide.src_path(src.filename), 'wb')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 72-73: ordinal not in range(128)
Powered by CherryPy 3.2.2

Dominant language
C++
Stars
8
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ext/slideshow

All issues in ext/slideshow

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.