insights-core icon indicating copy to clipboard operation
insights-core copied to clipboard

"listdir" specs cannot be collected correctly

Open xiangce opened this issue 2 years ago • 2 comments

The following error is reported

# cat insights-xxx-20220918000938/meta_data/insights.specs.Specs.ethernet_interfaces.json | python -m json.tool
{
    "name": "insights.specs.Specs.ethernet_interfaces",
    "exec_time": 2.2411346435546875e-05,
    "errors": [
        "Traceback (most recent call last):\n  File \"/var/lib/insights/last_stable.egg/insights/core/serde.py\", line 100, in call_serializer\n    return func(value), None\n  File \"/var/lib/insights/last_stable.egg/insights/core/serde.py\", line 85, in serialize\n    \"object\": to_dict(obj, root=root),\nTypeError: 'NoneType' object is not callable\n",
        "Traceback (most recent call last):\n  File \"/var/lib/insights/last_stable.egg/insights/core/serde.py\", line 100, in call_serializer\n    return func(value), None\n  File \"/var/lib/insights/last_stable.egg/insights/core/serde.py\", line 85, in serialize\n    \"object\": to_dict(obj, root=root),\nTypeError: 'NoneType' object is not callable\n",
        "Traceback (most recent call last):\n  File \"/var/lib/insights/last_stable.egg/insights/core/serde.py\", line 100, in call_serializer\n    return func(value), None\n  File \"/var/lib/insights/last_stable.egg/insights/core/serde.py\", line 85, in serialize\n    \"object\": to_dict(obj, root=root),\nTypeError: 'NoneType' object is not callable\n",
        "Traceback (most recent call last):\n  File \"/var/lib/insights/last_stable.egg/insights/core/serde.py\", line 100, in call_serializer\n    return func(value), None\n  File \"/var/lib/insights/last_stable.egg/insights/core/serde.py\", line 85, in serialize\n    \"object\": to_dict(obj, root=root),\nTypeError: 'NoneType' object is not callable\n"
    ],
    "results": null,
    "ser_time": 0.00010848045349121094
}

xiangce avatar Sep 28 '22 01:09 xiangce

Not a bug, this spec should not be added into the insights.specs.__init__.py file.

xiangce avatar Sep 28 '22 02:09 xiangce

But this spec is not used anymore, we can remove it.

xiangce avatar Sep 28 '22 02:09 xiangce