Jack,

Here is the output from scan channels after applying the RPM.patch file to RPM.py.


root@moe /root # cadmin scan_channel -l rhel3
https://moe.genscape.com/XMLRPC
Traceback (most recent call last):
  File "/usr/sbin/cadmin", line 125, in ?
    main()
  File "/usr/sbin/cadmin", line 118, in main
    scan_channels(sys.argv[2:])
  File "/usr/sbin/cadmin", line 55, in scan_channels
    result = rpcServer.doCall(server.cadmin.scanChannels, chan)
  File "rpcServer.py", line 304, in doCall
  File "/usr/lib/python2.2/xmlrpclib.py", line 821, in __call__
    return self.__send(self.__name, args)
  File "rpcServer.py", line 51, in _request1
  File "/usr/lib/python2.2/site-packages/rhn/rpclib.py", line 302, in _request
    verbose=self._verbose
  File "/usr/lib/python2.2/site-packages/rhn/transports.py", line 208, in reques
t
    return self.parse_response(fd)
  File "/usr/lib/python2.2/site-packages/rhn/transports.py", line 232, in parse_
response
    return u.close()
  File "/usr/lib/python2.2/xmlrpclib.py", line 571, in close
    raise apply(Fault, (), self._stack[0])
xmlrpclib.Fault: <Fault 1000: 'Function scanChannels called with wrong arg count
'>




Here the current.log file, log_level = 5, after applying the RPM.patch file to RPM.py.

Jan 06 10:22:19 Current v1.5.9 starting up
Jan 06 10:22:19 (/usr/share/current/db/postgres/postgres.py, getConnection(), 24): Obtaining connection
Jan 06 10:22:19 (/usr/share/current/db/postgres/postgres.py, getConnection(), 33): Connected via user/password
Jan 06 10:22:19 Inside Current main hander
Jan 06 10:22:19 Requesting: cadmin.scanChannels
Jan 06 10:22:19   with params = [{'channels': ['rhel3']}]
Jan 06 10:22:19 method = cadmin.scanChannels
Jan 06 10:22:19 module = cadmin
Jan 06 10:22:19 function = scanChannels
Jan 06 10:22:19 (/usr/share/current/current_apache.py, callAPIMethod(), 273): params = [{'channels': ['rhel3']}]
Jan 06 10:22:19 Dispatching: cadmin.scanChannels
Jan 06 10:22:19 /usr/share/current/api/cadmin.py:scanChannels({'chanlist': {'channels': ['rhel3']}, 'result': {}})
Jan 06 10:22:19 /usr/share/current/db/currentdb.py:updateChannel({'channel': 'rhel3'})
Jan 06 10:22:19 /usr/share/current/db/currentdb.py:_addRpms({'add_set': Set(['/local/rhel3/anaconda-9.1.3-3.RHEL.i386.rpm', '/local/rhel3/acroread-plugin-5.08-2.i386.r
pm', '/local/rhel3/at-3.1.8-48.ent.i386.rpm', '/local/rhel3/anaconda-runtime-9.1.3-3.RHEL.i386.rpm', '/local/rhel3/arptables_jf-0.0.7-0.3E.i386.rpm', '/local/rhel3/aut
ofs-4.1.3-12.i386.rpm', '/local/rhel3/anaconda-images-9.1-3.RHEL.noarch.rpm', '/local/rhel3/ant-libs-1.5.2-23.i386.rpm', '/local/rhel3/ant-1.5.2-23.i386.rpm', '/local/
rhel3/acroread-5.08-2.i386.rpm']), 'channel': 'rhel3'})
Jan 06 10:22:19 Adding /local/rhel3/anaconda-9.1.3-3.RHEL.i386.rpm to channel rhel3
Jan 06 10:22:19 Query SOURCEPACKAGE on (anaconda, i386)
Jan 06 10:22:19 Return of type = <type 'NoneType'>
Jan 06 10:22:19 Value of return = None
Jan 06 10:22:19 ERROR: Recognized function cadmin.scanChannels called with wrong arg count or other TypeError exception occured
Jan 06 10:2219 : EXCEPTION in /usr/share/current/current_apache.py, callAPIMethod(), 284 [logException()]
Traceback (most recent call last):
  File "/usr/share/current/current_apache.py", line 278, in callAPIMethod
    result = apply(func, params)
  File "/usr/share/current/api/cadmin.py", line 39, in scanChannels
    result[chan] = db.db.updateChannel(chan)
  File "/usr/share/current/db/currentdb.py", line 156, in updateChannel
    result['addedrpms'] = self._addRpms(channel, added_rpms)
  File "/usr/share/current/db/currentdb.py", line 318, in _addRpms
    pkg_id = self._insertPackageTable(header)
  File "/usr/share/current/db/currentdb.py", line 393, in _insertPackageTable
    header[RPM.SOURCEPACKAGE])
  File "/usr/share/current/RPM.py", line 72, in __getitem__
    return meth()
  File "/usr/share/current/RPM.py", line 87, in _get_SOURCEPACKAGE
    return int(self.is_source)
TypeError: int() argument must be a string or a number
Jan 06 10:22:19   params were: [{'channels': ['rhel3']}]
Jan 06 10:22:19 API Result = <Fault 1000: u'Function scanChannels called with wrong arg count'>
Jan 06 10:22:19 Fault: <Fault 1000: u'Function scanChannels called with wrong arg count'>
Jan 06 10:22:19 (/usr/share/current/current_apache.py, sendClientResult(), 226): Data sent.
Jan 06 10:22:19 sendClientResult() finished



Thanks again.

Patrick



-----Original Message-----
From: Patrick Geever
Sent: Thu 1/6/2005 10:15 AM
To: Jack Neely; users@current.tigris.org
Subject: RE: Fault: <Fault 1000: u'Function login called with wrong arg count'>

Jack,

Here is the output from scan channels. I have left just 10 rpm files in the repository directory, "/local/rhel3", just to make the log more readable.

root@moe /root # cadmin scan_channel -l rhel3
https://moe.genscape.com/XMLRPC
Traceback (most recent call last):
  File "/usr/sbin/cadmin", line 125, in ?
    main()
  File "/usr/sbin/cadmin", line 118, in main
    scan_channels(sys.argv[2:])
  File "/usr/sbin/cadmin", line 55, in scan_channels
    result = rpcServer.doCall(server.cadmin.scanChannels, chan)
  File "rpcServer.py", line 304, in doCall
  File "/usr/lib/python2.2/xmlrpclib.py", line 821, in __call__
    return self.__send(self.__name, args)
  File "rpcServer.py", line 51, in _request1
  File "/usr/lib/python2.2/site-packages/rhn/rpclib.py", line 302, in _request
    verbose=self._verbose
  File "/usr/lib/python2.2/site-packages/rhn/transports.py", line 208, in reques
t
    return self.parse_response(fd)
  File "/usr/lib/python2.2/site-packages/rhn/transports.py", line 232, in parse_
response
    return u.close()
  File "/usr/lib/python2.2/xmlrpclib.py", line 571, in close
    raise apply(Fault, (), self._stack[0])
xmlrpclib.Fault: <Fault 1000: 'Function scanChannels called with wrong arg count'>




Here the current.log file, log_level = 5:

Jan 06 09:59:12 Current v1.5.9 starting up
Jan 06 09:59:12 (/usr/share/current/db/postgres/postgres.py, getConnection(), 24): Obtaining connection
Jan 06 09:59:12 (/usr/share/current/db/postgres/postgres.py, getConnection(), 33): Connected via user/password
Jan 06 09:59:12 Inside Current main hander
Jan 06 09:59:12 Requesting: cadmin.scanChannels
Jan 06 09:59:12   with params = [{'channels': ['rhel3']}]
Jan 06 09:59:12 method = cadmin.scanChannels
Jan 06 09:59:12 module = cadmin
Jan 06 09:59:12 function = scanChannels
Jan 06 09:59:12 (/usr/share/current/current_apache.py, callAPIMethod(), 273): params = [{'channels': ['rhel3']}]
Jan 06 09:59:12 Dispatching: cadmin.scanChannels
Jan 06 09:59:12 /usr/share/current/api/cadmin.py:scanChannels({'chanlist': {'channels': ['rhel3']}, 'result': {}})
Jan 06 09:59:12 /usr/share/current/db/currentdb.py:updateChannel({'channel': 'rhel3'})
Jan 06 09:59:12 /usr/share/current/db/currentdb.py:_addRpms({'add_set': Set(['/local/rhel3/anaconda-9.1.3-3.RHEL.i386.rpm', '/local/rhel3/acroread-plugin-5.08-2.i386.r
pm', '/local/rhel3/at-3.1.8-48.ent.i386.rpm', '/local/rhel3/anaconda-runtime-9.1.3-3.RHEL.i386.rpm', '/local/rhel3/arptables_jf-0.0.7-0.3E.i386.rpm', '/local/rhel3/aut
ofs-4.1.3-12.i386.rpm', '/local/rhel3/anaconda-images-9.1-3.RHEL.noarch.rpm', '/local/rhel3/ant-libs-1.5.2-23.i386.rpm', '/local/rhel3/ant-1.5.2-23.i386.rpm', '/local/
rhel3/acroread-5.08-2.i386.rpm']), 'channel': 'rhel3'})
Jan 06 09:59:12 Adding /local/rhel3/anaconda-9.1.3-3.RHEL.i386.rpm to channel rhel3
Jan 06 09:59:12 ERROR: Recognized function cadmin.scanChannels called with wrong arg count or other TypeError exception occured
Jan 06 09:5912 : EXCEPTION in /usr/share/current/current_apache.py, callAPIMethod(), 284 [logException()]
Traceback (most recent call last):
  File "/usr/share/current/current_apache.py", line 278, in callAPIMethod
    result = apply(func, params)
  File "/usr/share/current/api/cadmin.py", line 39, in scanChannels
    result[chan] = db.db.updateChannel(chan)
  File "/usr/share/current/db/currentdb.py", line 156, in updateChannel
    result['addedrpms'] = self._addRpms(channel, added_rpms)
  File "/usr/share/current/db/currentdb.py", line 318, in _addRpms
    pkg_id = self._insertPackageTable(header)
  File "/usr/share/current/db/currentdb.py", line 393, in _insertPackageTable
    header[RPM.SOURCEPACKAGE])
  File "/usr/share/current/RPM.py", line 70, in __getitem__
    return meth()
  File "/usr/share/current/RPM.py", line 80, in _get_SOURCEPACKAGE
    return int(self.is_source)
TypeError: int() argument must be a string or a number
Jan 06 09:59:12   params were: [{'channels': ['rhel3']}]
Jan 06 09:59:12 API Result = <Fault 1000: u'Function scanChannels called with wrong arg count'>
Jan 06 09:59:12 Fault: <Fault 1000: u'Function scanChannels called with wrong arg count'>
Jan 06 09:59:12 (/usr/share/current/current_apache.py, sendClientResult(), 226): Data sent.
Jan 06 09:59:12 sendClientResult() finished


I will apply the patch you sent and send the output in the next message.

Thanks.

Patrick



-----Original Message-----
From: Jack Neely [mailto:jjneely@gmail.com]
Sent: Wed 1/5/2005 9:21 PM
To: users@current.tigris.org
Cc: Patrick Geever
Subject: Fwd: Fault: <Fault 1000: u'Function login called with wrong arg count'>

Patrick,

Can you make sure you are running Current 1.5.9 and that the Current
server is still tracebacking during scan channels with this traceback?

Traceback (most recent call last):
  File "/usr/share/current/current_apache.py", line 278, in callAPIMethod
    result = apply(func, params)
  File "/usr/share/current/api/cadmin.py", line 39, in scanChannels
    result[chan] = db.db.updateChannel(chan)
  File "/usr/share/current/db/currentdb.py", line 152, in updateChannel
    result['addedrpms'] = self._addRpms(channel, added_rpms)
  File "/usr/share/current/db/currentdb.py", line 311, in _addRpms
    pkg_id = self._insertPackageTable(header)
  File "/usr/share/current/db/currentdb.py", line 385, in _insertPackageTable
    header[RPM.SOURCEPACKAGE])
  File "/usr/share/current/RPM.py", line 70, in __getitem__
    return meth()
  File "/usr/share/current/RPM.py", line 80, in _get_SOURCEPACKAGE
    return int(self.is_source)
TypeError: int() argument must be a string or a number

If that is still the case I would like you to apply the attached
patch.  This doesn't fix the problem but will tell me what is going on
there.

Jack