Why command 'rhn-channel -L' fails with '<type 'exceptions.TypeError'>: Parse() argument 1 must be string or read-only buffer, not None.' ?
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 5.8 and later
- rhn-channel
Issue
- Execution of
rhn-channel -L
command fails with
<type 'exceptions.TypeError'>: Parse() argument 1 must be string or read-only buffer, not None
# rhn-channel -L
Username:
Password:
Ein Fehler trat auf:
<type 'exceptions.TypeError'>
up2date
Traceback (most recent call last):
File "/usr/sbin/rhn-channel", line 176, in <module>
main()
File "/usr/sbin/rhn-channel", line 167, in main
channels = get_available_channels(OPTIONS.user, OPTIONS.password)
File "/usr/sbin/rhn-channel", line 106, in get_available_channels
system_id = re.sub('^ID-', '', rpclib.xmlrpclib.loads(up2dateAuth.getSystemId())[0][0]['system_id'])
File "/usr/lib64/python2.6/xmlrpclib.py", line 1182, in loads
p.feed(data)
File "/usr/lib64/python2.6/xmlrpclib.py", line 601, in feed
self._parser.Parse(data, 0)
<type 'exceptions.TypeError'>: Parse() argument 1 must be string or read-only buffer, not None
Resolution
- The system is not registered with
RHN Classic
, to userhn-channel -L
make sure that system is registered only using RHN Classic.
Root Cause
- The system is not registered with
RHN Classic
, to userhn-channel -L
make sure that system is registered only using RHN Classic.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
1 Comments
I have been tryng to install php 5.5 and it´s the most dificult that exist!!
My suscription is:
+-------------------------------------------+
Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 1 guest)
Provides: Oracle Java (for RHEL Server)
Red Hat Software Collections Beta (for RHEL Server)
Red Hat Enterprise Linux Server
Red Hat Beta
SKU: RH0101594
Contract: 10709540
Account: 1106190
Serial: 1590098153858006549
Pool ID: 8a85f9814d9b4387014da1d0e5ac58cf
Provides Management: No
Active: True
Quantity Used: 1
Service Level: Standard
Service Type: L1-L3
Status Details: Subscription is current
Subscription Type: Standard
Starts: 05/27/2015
Ends: 05/27/2016
System Type: Virtual
When I run: rhn-channel -L
The answer is:
Traceback (most recent call last):
: Parse() argument 1 must be string or read-only buffer, not None
File "/usr/sbin/rhn-channel", line 215, in
main()
File "/usr/sbin/rhn-channel", line 202, in main
channels = get_available_channels(credentials.user, credentials.password)
File "/usr/sbin/rhn-channel", line 139, in get_available_channels
system_id = re.sub('^ID-', '', rpclib.xmlrpclib.loads(up2dateAuth.getSystemId())[0][0]['system_id'])
File "/usr/lib64/python2.6/xmlrpclib.py", line 1182, in loads
p.feed(data)
File "/usr/lib64/python2.6/xmlrpclib.py", line 601, in feed
self._parser.Parse(data, 0)