AttributeError: module 'importlib' has no attribute 'util'
I currently receive the following error when I try to trace a Python application via functiontrace:
Traceback (most recent call last):
File "/home/ricks/anaconda3/envs/functrace/bin/functiontrace", line 8, in <module>
sys.exit(main())
File "/home/ricks/anaconda3/envs/functrace/lib/python3.6/site-packages/functiontrace.py", line 95, in main
spec = importlib.util.spec_from_loader(
AttributeError: module 'importlib' has no attribute 'util'
As explained inthis StackOverflow quesiton this can be solved by importing the utils module as a named import from importlib import util, machinery. I created a pull request for this but this fix has to be tested first to ensure that it works on all systems.
System information
OS: Ubuntu 18.04
CONDA: anaconda v4.8.3
PIP: v20.2.4
FUNCTIONTRACE: v0.3.3
CARGO: v1.43.0
FUNCTIONTRACE-SERVER: v0.3.4
Edited by Rick Staa