-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Help for installing on windows #1433
Comments
+1 On this error. (Although it seems this issue is not System-Specific I'll fill out an issue template aswell.)
|
Fixed this issue, caused my deprecated package "imp" in Python 12 |
Still getting the same issue on Looking at mentioned commit, the page gives a warning
Comparing it to the current main branch, it looks like from six import text_type
from . import const
from .system import Path
+ import importlib.util
+ import importlib.machinery
+
+
+ def load_source(modname, filename):
+ loader = importlib.machinery.SourceFileLoader(modname, filename)
+ spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
+ module = importlib.util.module_from_spec(spec)
+ # The module is always executed and not cached in sys.modules.
+ # Uncomment the following line to cache the module.
+ # sys.modules[module.__name__] = module
+ loader.exec_module(module)
+ return module
- try:
- import importlib.util
-
- def load_source(name, pathname, _file=None):
- module_spec = importlib.util.spec_from_file_location(name, pathname)
- module = importlib.util.module_from_spec(module_spec)
- module_spec.loader.exec_module(module)
- return module
- except ImportError:
- from imp import load_source @Theblackcat98 did you suggest this change in a PR that you could reference? Did the fix magically disappear? :) |
related: #1434 |
The output of
thefuck --version
(something likeThe Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release
):Your system (Debian 7, ArchLinux, Windows, etc.):
How to reproduce the bug:
The error msg:
The text was updated successfully, but these errors were encountered: