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

bug: imp Module error #890

Open
2 tasks done
niksingh710 opened this issue Apr 28, 2024 · 6 comments
Open
2 tasks done

bug: imp Module error #890

niksingh710 opened this issue Apr 28, 2024 · 6 comments
Labels
type/bug Something isn't working

Comments

@niksingh710
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

After recent update of python on arch linux

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/yapsy/PluginManager.py", line 132, in <module>
    import importlib.abc.Loader as imp
ModuleNotFoundError: No module named 'importlib.abc.Loader'; 'importlib.abc' is not a package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/gradience", line 70, in <module>
    from gradience.frontend import main
  File "/usr/lib/python3.12/site-packages/gradience/frontend/main.py", line 37, in <module>
    from gradience.frontend.views.plugins_list import GradiencePluginsList
  File "/usr/lib/python3.12/site-packages/gradience/frontend/views/plugins_list.py", line 22, in <module>
    from yapsy.PluginManager import PluginManager
  File "/usr/lib/python3.12/site-packages/yapsy/PluginManager.py", line 134, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

To Reproduce

update python to latest on arch linux and try running gradience.

Expected behavior

No response

Screenshots

No response

OS

Arch Linux

DE/WM version

Hyprland

Version

Gradience, version 0.8.0-beta2

Installation method

AUR

Enabled system extensions (GNOME specific)

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@niksingh710 niksingh710 added the type/bug Something isn't working label Apr 28, 2024
Copy link
Contributor

Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your issue as soon as possible. You can also join the Matrix room: https://matrix.to/#/#Gradience-space:envs.net or the Discord server: https://discord.com/invite/4njFDtfGEZ

@niksingh710
Copy link
Author

https://docs.python.org/3.11/library/imp.html

imp has been removed in favour of importlib.

@allomanta
Copy link

I had this same issue but changing

import importlib.abc.Loader as imp

to

from importlib.abc import Loader as imp

in /usr/lib/python3.12/site-packages/yapsy/PluginManager.py resolved this error for me so that Gradience launches. However, I now get a new error:

AttributeError: type object 'Loader' has no attribute 'PY_SOURCE'
[yapsy] Unable to import plugin: /usr/share/gradience/plugins/firefox_gnome_theme
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/yapsy/PluginManager.py", line 518, in loadPlugins
    candidate_module = PluginManager._importModule(plugin_module_name, candidate_filepath)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/yapsy/PluginManager.py", line 584, in _importModule
    candidate_module = imp.load_module(plugin_module_name,plugin_file,candidate_filepath+".py",("py","r",imp.PY_SOURCE))

and styles seem to only partially get applied (the sidebar in nautilus changes colors but not much else) , but that might be something else.

@Almamu
Copy link

Almamu commented May 5, 2024

yapsy seems to have an open issue related to this: tibonihoo/yapsy#19

@Vixima
Copy link

Vixima commented May 7, 2024

yapsy seems to have an open issue related to this: tibonihoo/yapsy#19

it also seems like they're looking for a new maintainer for yapsy...
tibonihoo/yapsy#23

@ShiftHackZ
Copy link

As a temporary workaround, installing this aur package allows to run gradience.
https://aur.archlinux.org/packages/python-zombie-imp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

5 participants