Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

informant fails after major Python upgrade #40

Open
AWHubGit opened this issue Dec 14, 2021 · 10 comments
Open

informant fails after major Python upgrade #40

AWHubGit opened this issue Dec 14, 2021 · 10 comments

Comments

@AWHubGit
Copy link

`informant check
Traceback (most recent call last):
File "/usr/bin/informant", line 33, in
sys.exit(load_entry_point('informant==0.4.5', 'console_scripts', 'informant')())
File "/usr/bin/informant", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/usr/lib/python3.10/importlib/metadata/init.py", line 919, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.10/importlib/metadata/init.py", line 518, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for informant

`

@bradford-smith94
Copy link
Owner

Possible duplicate of #39, try rebuilding informant after the Python 3.10.1 update.

@JohnnyJayJay
Copy link

Encountering this issue after upgrading to Python 3.11. Reinstalling does not fix it, unfortunately.

Traceback (most recent call last):
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 563, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/informant", line 33, in <module>
    sys.exit(load_entry_point('informant==0.4.5', 'console_scripts', 'informant')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/informant", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for informant

@frederikstroem
Copy link

frederikstroem commented May 6, 2023

I had a similar issue after upgrading to Python 3.11.

I'm using Paru as my AUR helper, and I first tried to just uninstall, then reinstall, but it did not work. I figured the Paru cache had to be cleared before a proper rebuild was triggered, and it worked! This fixes this issue (#40) and #39 for me, but maybe it could be fixed in the PKGBUILD somehow ¯\(ツ)

Here is the fix:

  1. Remove informant: paru --remove informant
  2. Delete cache: rm -rf ~/.cache/paru/clone/informant
  3. Reinstall informant: paru informant

I imagine the procedure is similar with Yay, but I have not checked for myself.

@bradford-smith94
Copy link
Owner

I updated the package version just now (so informant won't block upgrades of itself), that might help with this cache issue, since there is actually a new package version now -- but otherwise short of increasing pkgrel whenever python updates I'm not sure if there's a way to have the PKGBUILD fix this.

@JohnnyJayJay
Copy link

I had a similar issue after upgrading to Python 3.11.

I'm using Paru as my AUR helper, and I first tried to just uninstall, then reinstall, but it did not work. I figured the Paru cache had to be cleared before a proper rebuild was triggered, and it worked! This fixes this issue (#40) and #39 for me, but maybe it could be fixed in the PKGBUILD somehow ¯_(ツ)_/¯

Here is the fix:

1. Remove informant: `paru --remove informant`

2. Delete cache: `rm -rf ~/.cache/paru/clone/informant`

3. Reinstall informant: `paru informant`

I imagine the procedure is similar with Yay, but I have not checked for myself.

Thank you for pointing this out. That also fixed it for me.

@mkolassa
Copy link

mkolassa commented Jun 1, 2023

I believe this has to do with the pacman hook to run informant, and it crashing. Instead of having to delete the cache, you can combine steps 2 & 3 as 'paru -S --rebuild informant'.

@Puxap-3opre
Copy link

Puxap-3opre commented Apr 27, 2024

Edit: nevermind, I just had to rebuild the package as explained here:
https://bbs.archlinux.org/viewtopic.php?pid=2114044#p2114044

cd /tmp
git clone https://aur.archlinux.org/informant.git
cd informant
makepkg -sifc

The original problem:

After upgrading Python from 3.11 to 3.12 informant fails to work.
I reinstalled it with yay (after I deleted ~/.cache/yay/informant/) but it still gives

:: Running pre-transaction hooks...
(1/1) Checking Arch News with Informant ...
Traceback (most recent call last):
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 397, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/informant", line 33, in <module>
    sys.exit(load_entry_point('informant==0.5.0', 'console_scripts', 'informant')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/informant", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 862, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 399, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for informant
error: command failed to execute correctly
error: failed to commit transaction (failed to run transaction hooks)
Errors occurred, no packages were upgraded.
 -> error installing: [/opt/packages/python-pyasyncore-1.0.4-1-any.pkg.tar.zst] - exit status 1

@bradford-smith94 bradford-smith94 changed the title informant fails since Python 3.10.1 informant fails after major Python upgrade Apr 30, 2024
@bradford-smith94 bradford-smith94 pinned this issue Apr 30, 2024
@Lazerbeak12345
Copy link

I've been getting this on version 0.6.0 of informant.

Reinstalling informant did not fix the problem. (I used yay -Rcns informant, updated my system, rebooted, then yay -S informant. Next system update failed with same error. Has happened across two machines, every update for about 3 months) Forcing a clean rebuild of the package did not work either.

@bradford-smith94
Copy link
Owner

I'm not familiar with how yay builds and installs packages, but my guess is that the issue is related to yay having some cached version of the previously built and installed version.

To get around this issue you have to trigger a rebuild of the package, you cannot reinstall a previously built version. I don't know how to help you do that with yay but if you use makepkg directly it should only be a matter of adding the -f flag to force a rebuild.

@mkolassa
Copy link

I've been getting this on version 0.6.0 of informant.

Reinstalling informant did not fix the problem. (I used yay -Rcns informant, updated my system, rebooted, then yay -S informant. Next system update failed with same error. Has happened across two machines, every update for about 3 months) Forcing a clean rebuild of the package did not work either.

Please use yay -S --rebuild informant to force it to build a new package and not use the cached package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants