Modify ↓
Opened 14 months ago
Closed 8 months ago
#13625 closed defect (fixed)
TypeError: sequence item 0: expected str instance, bytes found
Reported by: | Dirk Stöcker | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.1 |
Component: | version control/changeset view | Version: | 1.6 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fixed an error while rendering diff of a changeset if |
||
API Changes: | |||
Internal Changes: |
Description
When I call following URL https://software.rtcm-ntrip.org/changeset/10236/ntrip/trunk/BNC/src/src.pri?format=diff I get the mentioned error message.
This also happens when I deactivate all plugins.
Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/trac/web/main.py", line 609, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python3.6/site-packages/trac/web/main.py", line 301, in dispatch raise e File "/usr/lib/python3.6/site-packages/trac/web/main.py", line 247, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python3.6/site-packages/trac/versioncontrol/web_ui/changeset.py", line 343, in process_request self._render_diff(req, filename, repos, data) File "/usr/lib/python3.6/site-packages/trac/versioncontrol/web_ui/changeset.py", line 689, in _render_diff output = ''.join(output) TypeError: sequence item 0: expected str instance, bytes found
It is fixed by
-
versioncontrol/web_ui/changeset.py
old new 686 686 if Chrome(self.env).use_chunked_encoding: 687 687 length = None 688 688 else: 689 output = ''.join(output)689 output = b''.join(output) 690 690 length = len(output) 691 691 692 692 req.send_response(200)
Similar URLs on a second Trac instance work, so maybe that needs postgres as database to fail?
Applying the change on the working system with sqlite3 database does no harm.
Attachments (0)
Change History (3)
comment:1 by , 14 months ago
Milestone: | → 1.6.1 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:2 by , 14 months ago
Component: | general → version control/changeset view |
---|
comment:3 by , 8 months ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Good catch! That is raised while rendering content as diff format when
[trac] use_chunked_encoding
is disabled with Trac 1.6. The option is enabled by default since Trac 1.4.