Rednotebook broken

Hi, the execution of the command rednotebook using the bash generates:

INFO     Using GtkSourceView 4
Adding /usr/lib/python3.13/site-packages to sys.path
Traceback (most recent call last):
  File "/usr/bin/rednotebook", line 6, in <module>
    import journal
ModuleNotFoundError: No module named 'journal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/rednotebook", line 12, in <module>
    import rednotebook.journal
  File "/usr/lib/python3.13/site-packages/rednotebook/journal.py", line 71, in <module>
    from rednotebook.util import filesystem
  File "/usr/lib/python3.13/site-packages/rednotebook/util/filesystem.py", line 40, in <module>
    gi.require_version("GIRepository", "2.0")
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/gi/__init__.py", line 132, in require_version
    raise ValueError('Namespace %s not available for version %s' %
                     (namespace, version))
ValueError: Namespace GIRepository not available for version 2.0

Thanks in advance

May be related to Upgrading python-gobject from 3.50 to 3.52 breaks rythmbox xed and may other apps [resolved]

Is your system up to date?

Depends On : gtksourceview3 python-gobject python-pyenchant python-yaml webkit2gtk

Latest version extra/python-gobject 3.52.3-3

Update your system.

This user, who had a similar "No module named "journal" issue as you, had a corrupted file. That issue was detailed earlier in their log.

Is there more to the log than what you’ve shared?

1 Like

I installed the app on a updated system and yes it has the same issue as OP.

from what I can see use PIP for this

Python applications in the AUR are problematic. They’re a bit of a dependency nightmare and probably the rare exception to the rule that a PKGBUILD should be used for application installation.

I’ve seen decent Python applications orphaned and ultimately removed from the AUR, not because they weren’t good, but because maintaining them was near impossible I suspect.

1 Like

But this one is from extra repo. Or you mean in general?

extra/rednotebook 2.35-2
Modern desktop diary and personal journaling tool that lets you format, tag and search your entries

1 Like

I hadn’t realised it was in extra. I imagine the same difficulties apply to native packages too though, there’s just generally more seasoned people looking after them.

2 Likes

thats why I think PIP showed up everywhere but I would backup my stuff and update everything else first

Looks like this one needs a bit of attention from the packager/maintainer.

Flagged out-of-date on 2025-03-19

So OP needs perhaps to wait until the maintainer build a new one.

Thanks for your suggestions.

The configuration is perfecly working. The .rednotebook folder is shared using unison with some computers. The shown problem appears in EndevourOS computers, and it is NOT present in Manjaro. Computers running Manjaro executes perfectly Rednotebook.

By the way, Rednotebook is not an AUR app, it is present in the official repository.

I tried to execute the following code

#!/bin/bash
logfile=~/log/python3xRebuild.log
echo START $(date) |tee -a $logfile
PYDIRS=$(stat -c '%W %n' /usr/lib/python[3-9].* | sort -n | head -n -1 | awk '{ print $2 }')
    if [ -n "$PYDIRS" ]; then
      yay -Scc
      for d in $PYDIRS; do
        #echo "Found obsolete python directory $d, packages requiring rebuild:"
        for p in $(pacman -Qoq "$d"); do 
            command=$(echo yay -S $p --rebuildtree  --noconfirm  --rebuild --sudoloop)
            echo $command |tee -a $logfile
            eval $command
        done
      done
    fi

to rebuild all Python apps but the but is still present.

I think my EdenvourOS is updated (I executed sudo pacman -Suuyy and yay -Suuyy --sudoloop).

pacman -Ss rednotebook
extra/rednotebook 2.35-2 [installed]
pacman -Ss python-gobject
extra/python-gobject 3.52.3-3 [installed]
    Python bindings for GLib/GObject/GIO/GTK
extra/python-gobject-docs 3.52.3-3
    Developer documentation for PyGObject

The working Rednotebook on Manajaro system has the old python-gobject.

On Majaro:

pacman -Ss rednotebook
extra/rednotebook 2.35-2 [installed]
pacman -Ss python-gobject
extra/python-gobject 3.50.0-2 [installed]

I would link not downgrade python-gobject. Suggestions?

I suspect this is do to the fact that Manjaro holds back packages. So chances are its working in Manjaro because they are still on the Old Package.

1 Like

This confirms what @thefrog said. The Manjaro python-gobject package is behind the new version in Arch. Unless you are prepared to build the package from the source against the new updated packages in Arch, I cannot see any other options than waiting for an update from maintainer of rednotebook package in Arch. Others may have othe suggestions.

1 Like

It had the same problem and solved it by following these steps:

  1. Open the file: usr/lib/python3.13/site-packages/rednotebook/util/filesystem.py
  2. Change gi.require_version("GIRepository", "2.0") to gi.require_version("GIRepository", "3.0").
  3. Change repo = GIRepository.Repository.get_default() to repo = GIRepository.Repository().
  4. Save the file and open Rednotebook.

Sources:

Best regards

2 Likes

I temporarily resolved using FlatPack