Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] (pebcak) python: errors with python3 python3-apt  (Read 1052 times)

Offline michaa7

  • User
  • Posts: 2.446
[EN] (pebcak) python: errors with python3 python3-apt
« on: 2025/02/07, 02:12:18 »
On a (secondary XFCE) system apt/dpkg  can't configure
Code: [Select]
# 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?
« Last Edit: 2025/02/08, 02:23:42 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline finotti

  • User
  • Posts: 304
Re: python: errors with python3 python3-apt
« Reply #1 on: 2025/02/07, 14:42:47 »
Did you try "apt -f install"?

Offline michaa7

  • User
  • Posts: 2.446
Re: python: errors with python3 python3-apt
« Reply #2 on: 2025/02/07, 15:32:46 »
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?
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Online harley-peter

  • User
  • Posts: 1.100
Re: python: errors with python3 python3-apt
« Reply #3 on: 2025/02/07, 15:52:29 »
I did an upgrade just now with many syntax warnings but not with your error.
Code: [Select]
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

Offline ro_sid

  • User
  • Posts: 373
Re: python: errors with python3 python3-apt
« Reply #4 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.]

Offline michaa7

  • User
  • Posts: 2.446
Re: python: errors with python3 python3-apt
« Reply #5 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.
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline hendrikL

  • Administrator
  • User
  • *****
  • Gravatar
  • Posts: 1.093
Re: python: errors with python3 python3-apt
« Reply #6 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.

Offline michaa7

  • User
  • Posts: 2.446
Re: python: errors with python3 python3-apt
« Reply #7 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.
« Last Edit: 2025/02/07, 19:14:16 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.434
    • Land of the Buckeye
Re: python: errors with python3 python3-apt
« Reply #8 on: 2025/02/07, 19:59:56 »
... 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:

Code: [Select]
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
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline ro_sid

  • User
  • Posts: 373
Re: python: errors with python3 python3-apt
« Reply #9 on: 2025/02/07, 20:56:22 »
[...]
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.

Offline michaa7

  • User
  • Posts: 2.446
Re: python: errors with python3 python3-apt
« Reply #10 on: 2025/02/07, 21:00:37 »
... 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.
For KDE/Plasma:

Code: [Select]
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 ;-)
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline michaa7

  • User
  • Posts: 2.446
Re: python: errors with python3 python3-apt
« Reply #11 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.

Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline ro_sid

  • User
  • Posts: 373
Re: python: errors with python3 python3-apt
« Reply #12 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.

Offline michaa7

  • User
  • Posts: 2.446
Re: python: errors with python3 python3-apt
« Reply #13 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 ...
« Last Edit: 2025/02/08, 00:31:21 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline ro_sid

  • User
  • Posts: 373
Re: python: errors with python3 python3-apt
« Reply #14 on: 2025/02/08, 01:27:26 »
[...]
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:
Code: [Select]
Package: python3
Architecture: amd64
Auto-Installed: 1
neben vielen anderen Python-Paketen. Die Reihenfolge scheint dabei keine wirkliche Rolle zu spielen.