Doubt about Pickle and CORBA IDL types

D. Lopez-De-Ipina dl231 at
Wed Aug 4 19:11:34 CEST 1999


I want to serialize some data of CORBA IDL types in a shelve. I have
just made a very simple program that serialises a CORBA.string and a
CORBA.short, the first one works but the second one not. Could anybody
please tell me why this happens?:

#!/usr/bin/env python

import shelve

# Fnorb modules.
from Fnorb.orb import CORBA

if __name__ == '__main__':
  dictionary ='dummy')
  dictionary['str'] = CORBA.Any(CORBA.TC_string, 'hello')
  print "dictionary['str']:", dictionary['str'].value()

  dictionary['short'] = CORBA.Any(CORBA.TC_short, 5)
  print "dictionary['short']:", dictionary['short'].value()

[dl231 at worthingtons DynAny]$ python
dictionary['str']: hello
Traceback (innermost last):
  File "", line 14, in ?
    print "dictionary['short']:", dictionary['short'].value()
  File "/lce/lib/python1.5/", line 65, in __getitem__
    return Unpickler(f).load()
TypeError: ('too many arguments; expected 1, got 2', <class
Fnorb.orb.TypeCode.ShortTypeCode at 81705e0>, (tk_short,))



More information about the Python-list mailing list