Modify ↓
Opened 13 months ago
Closed 13 months ago
#13794 closed defect (fixed)
encoding error in diff
| Reported by: | Dirk Stöcker | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.6.1 |
| Component: | version control | Version: | 1.6 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: |
Fixed diff view to send |
||
| API Changes: | |||
| Internal Changes: | |||
Description
As I now grep the log for ValueError for #13792 following came up:
2024-10-10 15:18:28,643 Trac[main] ERROR: [177.55.179.253] Internal Server Error: <RequestWithSession "GET '/diff?term=%2Fjosm%2FTrunks%20'">, referrer 'https://josm.openstreetmap.de/diff?new_path=%2Fjosm%2Ftrunk&old_path=%2Fjosm%2Ftrunk&new_rev=&old_rev='
Traceback (most recent call last):Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/trac/web/main.py", line 609, in dispatch_request
dispatcher.dispatch(req)
File "/usr/local/lib/python3.10/dist-packages/trac/web/main.py", line 301, in dispatch
raise e
File "/usr/local/lib/python3.10/dist-packages/trac/web/main.py", line 247, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/local/lib/python3.10/dist-packages/trac/versioncontrol/web_ui/changeset.py", line 1200, in process_request
req.send(content, 'application/json', 200)
File "/usr/local/lib/python3.10/dist-packages/trac/web/api.py", line 879, in send
self._send(content, content_type, status)
File "/usr/local/lib/python3.10/dist-packages/trac/web/api.py", line 1015, in _send
self.write(content)
File "/usr/local/lib/python3.10/dist-packages/trac/web/api.py", line 975, in write
raise ValueError("Can't send str content")
ValueError: Can't send str content
To reproduce:
curl "https://josm.openstreetmap.de/diff?term=x" -H "X-Requested-With: XMLHttpRequest"
Attachments (0)
Change History (2)
comment:1 by , 13 months ago
| Component: | general → version control |
|---|---|
| Milestone: | → 1.6.1 |
| Owner: | set to |
| Status: | new → assigned |
| Version: | → 1.6 |
comment:2 by , 13 months ago
| Release Notes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.



Thanks for the reporting. I noticed another trivial issue when no
termparameter while reproducing it.02:43:21 Trac[main] ERROR: [192.168.11.100] Internal Server Error: <RequestWithSession "GET '/diff'">, referrer None Traceback (most recent call last): File "/home/jun66j5/venv/trac/1.6/lib/python3.11/site-packages/trac/web/main.py", line 609, in dispatch_request dispatcher.dispatch(req) File "/home/jun66j5/venv/trac/1.6/lib/python3.11/site-packages/trac/web/main.py", line 301, in dispatch raise e File "/home/jun66j5/venv/trac/1.6/lib/python3.11/site-packages/trac/web/main.py", line 247, in dispatch resp = chosen_handler.process_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jun66j5/venv/trac/1.6/lib/python3.11/site-packages/trac/versioncontrol/web_ui/changeset.py", line 1176, in process_request dirname, prefix = posixpath.split(req.args.get('term')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen posixpath>", line 103, in split TypeError: expected str, bytes or os.PathLike object, not NoneType