Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

bug: imp Module error  #890

Open
Open

Description

@semi710

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

Activity

  1. added
    type/bug
    on Apr 28, 2024
  2. github-actions commented on Apr 28, 2024

    @github-actions
    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

  3. semi710 commented on Apr 28, 2024

    @semi710
    Author

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

    imp has been removed in favour of importlib.

  4. allomanta commented on May 4, 2024

    @allomanta

    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.

  5. Almamu commented on May 5, 2024

    @Almamu

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

  6. Vixima commented on May 7, 2024

    @Vixima

    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

  7. ShiftHackZ commented on May 13, 2024

    @ShiftHackZ

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions