Siduction Forum

Siduction Forum => Upgrade Warnings => Topic started by: michaa7 on 2025/02/07, 02:12:18

Title: (pebcak) python: errors with python3 python3-apt
Post by: michaa7 on 2025/02/07, 02:12:18
On a (secondary XFCE) system apt/dpkg  can't configure# dpkg --configure -a
python3 (3.13.1-2) wird eingerichtet ...
running python rtupdate hooks for python3.13...
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 209, in <module>
    main()
    ~~~~^^
  File "/usr/bin/py3clean", line 195, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 55, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of byobu
error running python rtupdate hook byobu
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 209, in <module>
    main()
    ~~~~^^
  File "/usr/bin/py3clean", line 195, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 55, in from_package
    raise Exception("cannot get content of %s" % package_name)

....

error running python rtupdate hook system-config-printer
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 209, in <module>
    main()
    ~~~~^^
  File "/usr/bin/py3clean", line 195, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 55, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of xfce4-panel-profiles
error running python rtupdate hook xfce4-panel-profiles
dpkg: Fehler beim Bearbeiten des Paketes python3 (--configure):
»installiertes post-installation-Skript des Paketes python3«-Unterprozess gab den Fehlerwert 4 zurück
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-apt:
python3-apt hängt ab von python3 (<< 3.14); aber:
  Paket python3 ist noch nicht konfiguriert.
python3-apt hängt ab von python3 (>= 3.12~); aber:
  Paket python3 ist noch nicht konfiguriert.
python3-apt hängt ab von python3:any; aber:
  Paket python3 ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes python3-apt (--configure):
Abhängigkeitsprobleme - verbleibt unkonfiguriert
Fehler traten auf beim Bearbeiten von:
python3
python3-apt



I can't find any bug report. Am I alone with this error?

Any suggestions?
Title: Re: python: errors with python3 python3-apt
Post by: finotti on 2025/02/07, 14:42:47
Did you try "apt -f install"?
Title: Re: python: errors with python3 python3-apt
Post by: michaa7 on 2025/02/07, 15:32:46
Quote from: finotti on 2025/02/07, 14:42:47
Did you try "apt -f install"?
Yes.
And "apt install --reinstall python3  python3-apt"
And "apt install --reinstall xfce4"
And I purged it befor reinstalling it.

And when I tried to send a bugreport on that system, I had to install reportbug-gtk ... which ended up not being configured due to .... python3 errors.

Fortunalty, that system is a secondary system which is still usable but now seems to be messed up by some strange python versioning problems.

But why is it only me? Which xfce4 python3 python3-apt versions are installed on your systems?
Title: Re: python: errors with python3 python3-apt
Post by: harley-peter on 2025/02/07, 15:52:29
I did an upgrade just now with many syntax warnings but not with your error.
python3-apt:
  Installiert:           2.9.8
  Installationskandidat: 2.9.8
  Versionstabelle:
*** 2.9.8 500
        500 https://deb.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status
python3:
  Installiert:           3.13.1-2
  Installationskandidat: 3.13.1-2
  Versionstabelle:
*** 3.13.1-2 500
        500 https://deb.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status
xfce4:
  Installiert:           4.20
  Installationskandidat: 4.20
  Versionstabelle:
*** 4.20 500
        500 https://deb.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status
Title: Re: python: errors with python3 python3-apt
Post by: ro_sid on 2025/02/07, 16:51:57
@michaa7: Download python3 and/or python3-apt "manually" from the repository and do a "dpkg -i ..." of the package/s within the directory, where you downloaded it/them.
[As far as I can see, dpkg depends neither on apt, nor on python in any way.]
Title: Re: python: errors with python3 python3-apt
Post by: michaa7 on 2025/02/07, 17:19:26
The situation has worsened: since I purged and reinstalled XFCE, I can't login anymore. The loginmanager (lightdm) appears, and after entering my user/PW it switches to a black screen as it it were to open an XFCE session but then turns back to the login.

I will try boot to runlevel 3 try to manually execute dpkg -i ... , but the problem was NOT dpkg but xfce-session-settings which could not be configured.

If I am really the only ***xfce*** user (in my main system I use fluxbox and seldomly lxqt) I won't make too big efforts to fix the messed up system, though.
Title: Re: python: errors with python3 python3-apt
Post by: hendrikL on 2025/02/07, 17:59:34
did you start a wayland session with xfce? That doesn't really work. And no, i use plasma, but I know that xfce and Wayland are not the best friends.
Title: Re: python: errors with python3 python3-apt
Post by: michaa7 on 2025/02/07, 18:11:58
I normally don't use wayland. I once gave it a try as lightdm offers both. To no avail, as expected. But the errors descibed here occured during an xorg session.

EDIT:
I can install python3 without error, using "dpkg -i ...". According to apt, there is no python3 package. Very strange. And when I then try to install python3-apt it complains about python3 not being configured and errors out. "apt -f install" still errors out with a handfull of xfce packages not being configured due to python errors like described above.
Title: Re: python: errors with python3 python3-apt
Post by: dibl on 2025/02/07, 19:59:56
Quote from: michaa7 on 2025/02/07, 17:19:26
... and after entering my user/PW it switches to a black screen as it it were to open an XFCE session but then turns back to the login.

That can happen if a root command at the /home/user $ prompt left a root-owned file in the user's home folder.

For KDE/Plasma:

python3:
  Installed: 3.13.1-2
  Candidate: 3.13.1-2
  Version table:
*** 3.13.1-2 500
        500 https://deb.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status
python3-apt:
  Installed: 2.9.8
  Candidate: 2.9.8
  Version table:
*** 2.9.8 500
        500 https://deb.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status

Title: Re: python: errors with python3 python3-apt
Post by: ro_sid on 2025/02/07, 20:56:22
Quote from: michaa7 on 2025/02/07, 18:11:58
[...]
I can install python3 without error, using "dpkg -i ...". According to apt, there is no python3 package. Very strange. And when I then try to install python3-apt it complains about python3 not being configured and errors out. "apt -f install" still errors out with a handfull of xfce packages not being configured due to python errors like described above.
That is strange, a python-not-configured should have been reported by "dpkg -i"! So, if that went smooth ...
To get an "apt-independend" view about what is installed, you can do a "dpkg --get-selections" and have a look there. All is listed here. If not, there is a problem with "/var/lib/dpkg", and especially the "status"-file in it.
Could the partition containing your /var-directory be full or any read/block/"sector"-errors be in it?
Then there is the "dpkg --configure -a", that you mentioned in your original posting. But this is the one, that "apt -f install" is using, too. So if it is not just a command calling problem, you are in trouble.
Title: Re: python: errors with python3 python3-apt
Post by: michaa7 on 2025/02/07, 21:00:37
Quote from: dibl on 2025/02/07, 19:59:56
Quote from: michaa7 on 2025/02/07, 17:19:26
... and after entering my user/PW it switches to a black screen as it it were to open an XFCE session but then turns back to the login.

That can happen if a root command at the /home/user $ prompt left a root-owned file in the user's home folder.

I assume that then should be fount at the top layer/folder in user ~ ... but I did not.
Quote from: dibl on 2025/02/07, 19:59:56
For KDE/Plasma:

python3:
  Installed: 3.13.1-2
  Candidate: 3.13.1-2
  Version table:
*** 3.13.1-2 500
        500 https://deb.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status
python3-apt:
  Installed: 2.9.8
  Candidate: 2.9.8
  Version table:
*** 2.9.8 500
        500 https://deb.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status


I have no clues what messed up my secondary system. But it seems it is self induced as I'm alone with it although I would love to hear from an XFCE user. So I wait it out until I decide to overwrite it with siductions's latest ...

Thanks to all ...

@ro_sid

will have a look, but currently using my main system ;-)
Title: Re: python: errors with python3 python3-apt
Post by: michaa7 on 2025/02/07, 21:11:16
@ ro_sid

Aus der Sicht von "dpkg --get-selections" sind alle Pakete auf "install". Einschließlich python3, python3-apt, xfce*. Es gibt nicht ein hängendes Paket ... für dpkg.

EN:
for dpkg all is well, all packages have status "install" including the ones making trouble with apt.

Title: Re: python: errors with python3 python3-apt
Post by: ro_sid on 2025/02/07, 21:26:47
Ok, dann sollte sich mit "dpkg-reconfigure <package>" jedes Paket (auch xfce) wieder konfigurieren lassen.
Falls apt wirklich "kaputt" ist, sollten nur die Abhängigkeiten - was ist "von Hand" installiert, was per Voraussetzung - (eventuell) verloren sein (extended_states in /var/lib/apt). Vielleicht überhaupt mal dieses Verzeichnis auf Plausibilität und Unversehrtheit überprüfen.
Title: Re: python: errors with python3 python3-apt
Post by: michaa7 on 2025/02/07, 23:21:01
Nun, das ist ein mittlerweile endloser Rattenschwanz.

Dein anderer Tipp hat aber zumindest eine Auffälligkeit erbracht: In /var/lib/apt/extended_states existiert kein paket "python3" (für dpkg --get-selections ist es da!). Das ist zumindest mal ein Fehler der zeigt das da ein Loch ist wo keines sein sollte. Allerdings weiß ich natürlich nicht was sonst noch fehlt.

Frage: die items sind ja nicht alphabetisch geordnet. Hat die Reihenfolge eine Bedeutung? Weißt du das? Wenn nicht würde ich testen was passiert wenn ich das Paket einfach hineineditiere, es ist ja da? Ich würde diese installation zwar gerne retten, aber der Aufwand ist mir bald zuviel ... und es ist ja nicht mein arbeitssystem ...
Title: Re: python: errors with python3 python3-apt
Post by: ro_sid on 2025/02/08, 01:27:26
Quote from: michaa7 on 2025/02/07, 23:21:01
[...]
Frage: die items sind ja nicht alphabetisch geordnet. Hat die Reihenfolge eine Bedeutung? Weißt du das? Wenn nicht würde ich testen was passiert wenn ich das Paket einfach hineineditiere, es ist ja da? Ich würde diese installation zwar gerne retten, aber der Aufwand ist mir bald zuviel ... und es ist ja nicht mein arbeitssystem ...
Tut mir leid, wissen tue ich es nicht, aber meine "gestützte" Vermutung sagt mir, daß es der "Reihenfolge des Auftretens/Installieren" nach erfolgt, also stetig wächst, abzüglich der Löschungen.
Die gute Nachricht: ich sehe nur Einträge mit "Auto-Installed: 1", keine zu händisch angeforderten Paketen! Daher muß Python da nicht auftauchen, was es bei mir allerdings tut in Form von:

Package: python3
Architecture: amd64
Auto-Installed: 1

neben vielen anderen Python-Paketen. Die Reihenfolge scheint dabei keine wirkliche Rolle zu spielen.
Title: Re: python: errors with python3 python3-apt
Post by: michaa7 on 2025/02/08, 02:22:35
Die Ursache saß, wie häufig, zwischen Stuhl und Tastatur.

Problem between chair and keyboard:

After my last internal modification I permanently (fstab) mounted the archives to the wrong directory (/var instead of /var/cache/apt/archives). Which means that from that point in time the system did not see the original folders which were created during install under /var.

As I rarely used this system I did not notice until today when a dist-upgrade conflicted due to some postinstall scripts not being the ones needed. Or whatever. I messed up the system and will now (= one day) unhappily install one of siduction's latest.

Sorry for the noise ... and thanks. You may move this thread to wherever it fits.