UnicodeEncodeError: 'ascii' codec can't encode characters in position 72-73: ordinal not in range(128)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ext/slideshow
-
Change queue broken Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
enhancement Frontend slideshow-0.3
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
enhancement Frontend Future
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
slide delete commit Opendefect Frontend slideshow-0.3
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
duckdb/duckdb-wasm#2258 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend Opencoarray
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·