hermes - 💡(How to fix) Fix [Bug]: Renaming a profile caused error in profiles.py line 1526 [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Python error while trying to rename a profile. 2. Error shows: `Traceback (most recent call last): Threw a Python error.

Additional Logs / Traceback (optional)

As LLM recommended by the error I've provided, it's a simple fix from 'moving' the directory to 'copy' and 'delete', since it's caused by cross-mounted (and I don't know why it's defined as cross-mounted devices)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

Report       https://paste.rs/uzibz
agent.log    https://paste.rs/3UV6U
gateway.log  https://paste.rs/1YRL6

---
RAW_BUFFERClick to expand / collapse

Bug Description

Python error while trying to rename a profile.

Steps to Reproduce

  1. Run cmd hermes profile rename chris cash
  2. Error shows: Traceback (most recent call last): File "/root/.local/bin/hermes", line 10, in <module> sys.exit(main()) ^^^^^^ File "/root/.hermes/hermes-agent/hermes_cli/main.py", line 14335, in main args.func(args) File "/root/.hermes/hermes-agent/hermes_cli/main.py", line 10578, in cmd_profile new_dir = rename_profile(args.old_name, args.new_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.hermes/hermes-agent/hermes_cli/profiles.py", line 1526, in rename_profile old_dir.rename(new_dir) File "/root/.local/share/uv/python/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/pathlib.py", line 1175, in rename os.rename(self, target) OSError: [Errno 18] Invalid cross-device link: '/root/.hermes/profiles/chris' -> '/root/.hermes/profiles/cash'

Expected Behavior

Should rename the profile from chris to cash by moving ~/.hermes/profiles/chris to cash, and rename the executable links.

Actual Behavior

Threw a Python error.

Affected Component

Setup / Installation

Messaging Platform (if gateway-related)

No response

Debug Report

Report       https://paste.rs/uzibz
agent.log    https://paste.rs/3UV6U
gateway.log  https://paste.rs/1YRL6

Operating System

Ubuntu 24.04 in WSL2 of Windows 11

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

As LLM recommended by the error I've provided, it's a simple fix from 'moving' the directory to 'copy' and 'delete', since it's caused by cross-mounted (and I don't know why it's defined as cross-mounted devices)

OSError: [Errno 18] Invalid cross-device link — os.rename() in line 1526 of profiles.py used Path.rename(), which is os.rename() and does not support cross-mount.

Proposed Fix (optional)

LM suggested to use shutil.copytree and then shutil.rmtree instead of os.rename().

I've tried this modification suggestion and it worked fine.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Bug]: Renaming a profile caused error in profiles.py line 1526 [1 pull requests]