Issue with Autojump Functionality in Fish Shell on CachyOS

Hello,

I encountered an issue with the Autojump functionality while using the Fish shell on CachyOS after latest update 2024-12-22.
The following error message is displayed:

Traceback (most recent call last):
  File "/usr/bin/autojump", line 39, in <module>
    from autojump_argparse import ArgumentParser
ModuleNotFoundError: No module named 'autojump_argparse'
[: Missing argument at index 3
= .
    ^
/usr/share/fish/functions/autojump.fish (line 53):
            if [ $output = "." ]
               ^
in function 'j' with arguments 'Documents'
autojump: directory 'Documents' not found

Based on analysis using ChatGPT, the issue seems to be related to a missing or improperly configured Python dependency. The error occurs when attempting to use the j command for directory navigation, such as j Documents.

I would like to inquire whether this issue might be related to another bug I recently reported – specifically, the malfunction of the KODI application on the same system, which also exhibited errors linked to Python dependencies.


System Information:

  • Distribution: CachyOS
  • Shell: Fish
  • Autojump Version: 22.5.3-9
  • Python Version: 3.13.1

Could you investigate if this is a known issue or if it might be caused by recent changes in the repositories for Python or the Fish shell?

Solution

This issue arises due to a migration from an older Python version (e.g., 3.12) to a newer one (e.g., 3.13), where some packages and modules are compiled for the previous Python version and are incompatible with the current one.

  1. Check Python Version

    • Verify the available Python versions in your system using:

      ls /usr/lib/
      
    • You should see directories like:

      python3.12
      python3.13
      
    • Check the currently used Python version with:

      python --version
      

      For example:

      Python 3.13.1
      

      This indicates that you need to migrate packages from Python 3.12 to 3.13.

  2. Recompile Packages

    • To perform the migration and recompile packages, run:
      paru -S --rebuild --noconfirm $(paru -Qqo /usr/lib/python3.12/)
      
      This command:
      • Identifies all packages compiled for Python 3.12.
      • Rebuilds them for the current Python version (3.13).
  3. Restart the Terminal

    • After successfully recompiling, restart the terminal to apply the changes:
      exit
      
      or close and reopen the terminal.
  4. Verify Functionality

    • Test if Autojump works correctly:
      j Music
      
      If the command works without error, the issue has been resolved.

Notes

This procedure should work for all similar issues related to migration between Python versions on CachyOS or other Arch-based distributions.