Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1686439 - Insights abrt error - No module named colorama
Summary: Insights abrt error - No module named colorama
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Insights
Classification: Red Hat
Component: Insights for RHEL
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lindani Phiri
QA Contact: Jeff Needle
Kevin Blake
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-07 13:18 UTC by Suraj Patil
Modified: 2019-04-01 00:45 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-01 00:45:54 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Suraj Patil 2019-03-07 13:18:34 UTC
Description of problem:

System giving abrt error as below - 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cat.py:31:<module>:ImportError: No module named colorama
:
:Traceback (most recent call last):
:  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
:    "__main__", fname, loader, pkg_name)
:  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
:    exec code in run_globals
:  File "/var/lib/insights/last_stable.egg/insights/tools/cat.py", line 31, in <module>
:ImportError: No module named colorama
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have verified that insights is importing "colorama" in the code. 

/var/lib/insights/last_stable.egg/insights/tools/cat.py

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from __future__ import print_function
import argparse
import logging
import os
import sys
import yaml

from contextlib import contextmanager

import colorama as C                         <<======= 

from insights import apply_configs, create_context, dr, extract, HostContext
from insights.core.spec_factory import ContentProvider
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It looks like insights packing issue as "python-colorama" is not included as the dependency. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root@localhost tmp]# rpm -q insights-client --requires
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/usr/bin/python
PyYAML
config(insights-client) = 0:3.0.3-9.el7_5
gpg
libcgroup
pciutils
pyOpenSSL
python
python(abi) = 2.7
python-magic
python-requests >= 2.6
python-setuptools
python-six
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
systemd
systemd
systemd
systemd
tar
rpmlib(PayloadIsXz) <= 5.2-1
[root@localhost tmp]# 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Version-Release number of selected component (if applicable):
insights-client-3.0.3-9.el7_5.noarch

Comment 2 Lindani Phiri 2019-03-07 14:30:25 UTC
Can you please provide more information about the environment you are seeing this issue in?
What version of rhel are you running?
Can you provide the output of the command 'insights-client --version'

Comment 3 jjaggars 2019-03-07 14:57:05 UTC
Hey Suraj,

We've patched this issue upstream (https://github.com/RedHatInsights/insights-core/pull/1721).

We are planning on distributing the fix sometime today.

Comment 5 Suraj Patil 2019-03-07 16:48:29 UTC
Hey Jesse,

Thanks for the update. 

Jesse++

Comment 13 jjaggars 2019-03-08 18:41:15 UTC
Hey Suraj,

The fix has been distributed, but does not require an rpm update.  As long as updates have not been disabled (it is uncommon to disable them) then the next run of the client should update the code that needs the fix automatically.

Comment 14 Jeff Needle 2019-03-08 19:24:16 UTC
I can confirm that the issue is fixed with Core: 3.0.81-1


Note You need to log in before you can comment on or make changes to this bug.