Bug 1877231

Summary: Error refreshing hardware page: attrib must be dict, not NoneType
Product: [Fedora] Fedora Reporter: Artem <ego.cordatus>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: berrange, crobinso, philip.wyett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-09 14:23:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Artem 2020-09-09 07:02:02 UTC
Description of problem:
After recent updates in f33 i've got this error when trying to edit CPU section:

  Error refreshing hardware page: attrib must be dict, not NoneType


Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details/details.py", line 1025, in hw_selected
    self.refresh_config_cpu()
  File "/usr/share/virt-manager/virtManager/details/details.py", line 2223, in refresh_config_cpu
    if not self._cpu_secure_is_available():
  File "/usr/share/virt-manager/virtManager/details/details.py", line 2167, in _cpu_secure_is_available
    features = domcaps.get_cpu_security_features()
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 308, in get_cpu_security_features
    cpu = self._get_expanded_cpu(m)
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 273, in _get_expanded_cpu
    cpuXML = self._convert_mode_to_cpu(mode.get_xml())
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 267, in _convert_mode_to_cpu
    root.attrib = None
TypeError: attrib must be dict, not NoneType



Version-Release number of selected component (if applicable):
virt-manager-2.2.1-3.fc32 (f32 package!)


How reproducible:
Open virt-manager and try edit CPU section new or old one existed VM.


Actual results:
  Error refreshing hardware page: attrib must be dict, not NoneType

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details/details.py", line 1025, in hw_selected
    self.refresh_config_cpu()
  File "/usr/share/virt-manager/virtManager/details/details.py", line 2223, in refresh_config_cpu
    if not self._cpu_secure_is_available():
  File "/usr/share/virt-manager/virtManager/details/details.py", line 2167, in _cpu_secure_is_available
    features = domcaps.get_cpu_security_features()
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 308, in get_cpu_security_features
    cpu = self._get_expanded_cpu(m)
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 273, in _get_expanded_cpu
    cpuXML = self._convert_mode_to_cpu(mode.get_xml())
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 267, in _convert_mode_to_cpu
    root.attrib = None
TypeError: attrib must be dict, not NoneType


Expected results:
No such error. And ability to apply changes as before

Comment 1 Cole Robinson 2020-09-09 14:23:09 UTC

*** This bug has been marked as a duplicate of bug 1869046 ***