aider icon indicating copy to clipboard operation
aider copied to clipboard

Uncaught TypeError in symbolic.py line 413

Open ianchov opened this issue 5 months ago • 1 comments

Aider version: 0.56.0 Python version: 3.12.2 Platform: macOS-14.6.1-arm64-arm-64bit Python implementation: CPython Virtual environment: No OS: Darwin 23.6.0 (64bit) Git version: git version 2.39.3 (Apple Git-146)

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 698, in main
    coder.run()
  File "base_coder.py", line 735, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 772, in run_one
    message = self.preproc_user_input(user_message)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 761, in preproc_user_input
    return self.commands.run(inp)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "commands.py", line 221, in run
    return self.do_run(matching_commands[0][1:], rest_inp)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "commands.py", line 196, in do_run
    return cmd_method(args)
           ^^^^^^^^^^^^^^^^
  File "commands.py", line 432, in cmd_undo
    self.raw_cmd_undo(args)
  File "commands.py", line 483, in raw_cmd_undo
    current_branch = self.coder.repo.repo.active_branch.name
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base.py", line 1036, in active_branch
    return self.head.reference
           ^^^^^^^^^^^^^^^^^^^
  File "symbolic.py", line 413, in _get_reference
    raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha))
TypeError: HEAD is a detached symbolic reference as it points to '117456a2f3fc5b07f68ca2492893a6c28baa4d89'

The workflow is:

  • aider worked out some stuff
  • exited aider
  • git checkout a commit to rollback stuff
  • worked some stuff
  • started aider again and asked it to do something

ianchov avatar Sep 13 '24 19:09 ianchov