I’m experimenting with Rhodecode 5, and am getting errors trying to set up the simple Whoosh based indexing. I think I see the problem but not familiar enough with the codebase to suggest a fix.
Rhodecode 5.5.0 CE / rcstack 5.26.0
The rcstack cli cmd rhodecode-index
command fails with a ‘server reported’ error. The more interesting stack trace is in the rhodecode server logs. There appears to be a mismatch between the get_repo_file
representing file paths as a string, and the git/hg backends expecting file paths to be bytes.
Client logs
ERROR Calling method get_repo_file
. Server reported: failed to get repo: bli/bgptest
file at path docs/usage.rst
Server logs
“timestamp”: “2025-03-04T15:26:52.595174+00:00”, “levelname”: “ERROR”, “name”: “rhodecode.api.views.repo_api”, “message”: “Exception occurred while trying to get repo bli/bgptest file”,
Traceback (most recent call last):
File "/home/rhodecode/venv/lib/python3.11/site-packages/rhodecode/api/views/repo_api.py", line 623, in get_repo_file
node = ScmModel().get_node(
^^^^^^^^^^^^^^^^^^^^
File "/home/rhodecode/venv/lib/python3.11/site-packages/rhodecode/model/scm.py", line 686, in get_node
file_node = commit.get_node(file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rhodecode/venv/lib/python3.11/site-packages/rhodecode/lib/vcs/backends/hg/commit.py", line 319, in get_node
path = self._fix_path(path)
^^^^^^^^^^^^^^^^^^^^
File "/home/rhodecode/venv/lib/python3.11/site-packages/rhodecode/lib/vcs/backends/base.py", line 777, in _fix_path
raise ValueError(f"path=`{safe_str(path)}` must be bytes")
ValueError: path=`docs/usage.rst` must be bytes"}