You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the latest master today (avocado 94.0) there are errors when loading avocado-vt modules into python3 session.
I tried using avocado 92lts and 82lts but this issue reproduces.
After the error message, the module is available and I confirmed the log_line function that can't be imported is available in the utils_misc. I'm not familiar with the importlib, any idea how to debug this?
$ python3 --version
Python 3.6.8
$ cd avocado
$ pip install -r requirements-dev.txt
$ pip install -e .
$ cd ../avocado-vt
$ pip install -r
$ pip install -r requirements.txt
$ pip install -e .
$ python3
>> from virttest import utils_misc
No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
Reproduced traceback from: /home/smitterl/NotBackedUp/avocado-tmp/avocado/avocado/core/extension_manager.py:216
Traceback (most recent call last):
File "/home/smitterl/NotBackedUp/avocado-tmp/avocado-vt/avocado_vt/plugins/vt_init.py", line 276, in initialize
virt_loader = getattr(importlib.import_module('avocado_vt.loader'),
File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/smitterl/NotBackedUp/avocado-tmp/avocado-vt/avocado_vt/loader.py", line 33, in <module>
from .test import VirtTest
File "/home/smitterl/NotBackedUp/avocado-tmp/avocado-vt/avocado_vt/test.py", line 33, in <module>
from virttest import utils_env
File "/home/smitterl/NotBackedUp/avocado-tmp/avocado-vt/virttest/utils_env.py", line 19, in <module>
from virttest import ip_sniffing
File "/home/smitterl/NotBackedUp/avocado-tmp/avocado-vt/virttest/ip_sniffing.py", line 21, in <module>
from virttest.utils_misc import log_line
ImportError: cannot import name 'log_line'
Error running method "initialize" of plugin "vt-init": cannot import name 'log_line'
>>>
The text was updated successfully, but these errors were encountered:
smitterl
changed the title
Can't load avocado-vt modules into python console because vt_init fails
vt_init raises errors when importing avocado-vt modules into python session
Apr 6, 2022
virttest/utils_logfile.py and virttest/utils_misc.py duplicate the same code : def log_line(filename, line) implementation. I try import log_line from virttest/utils_logfile.py in the file virttest/ip_sniffing.py, the issue can be fixed
chunfuwen
added a commit
to chunfuwen/avocado-vt
that referenced
this issue
Apr 6, 2022
Error running method "initialize" of plugin "vt-init": cannot import name 'log_line' when
import from virttest import utils_misc in python terminal
virttest/utils_logfile.py and virttest/utils_misc.py duplicate the same code :
def log_line(filename, line) implementation
need change virttest/ip_sniffing.py to import log_line from virttest/utils_logfile.py
Signed-off-by: chunfuwen <[email protected]>
With the latest master today (avocado 94.0) there are errors when loading avocado-vt modules into python3 session.
I tried using avocado 92lts and 82lts but this issue reproduces.
After the error message, the module is available and I confirmed the
log_line
function that can't be imported is available in theutils_misc
. I'm not familiar with the importlib, any idea how to debug this?The text was updated successfully, but these errors were encountered: