Orange Forum • View topic - orange.KernelException unpickling bugs

orange.KernelException unpickling bugs

A place to ask questions about methods in Orange and how they are used and other general support.

orange.KernelException unpickling bugs

Postby aonlazio » Mon Sep 21, 2009 3:08

Sometime when I tries to unpickle the objects I got this error

result = cPickle.loads(a_object)

KernelException: ("'orange.ExampleTable': index -2147483648 out of range 0-50", <built-in function __pickleLoaderSVMClassifier>, (<type 'orange.SVMClassifier'>, EnumVariable 'Disease', <ExampleTable instance at 0x04EF15B0>, <ExampleTable instance at 0x04EF15F0>, 'svm_type c_svc\nkernel_type rbf\ngamma 0.125\nnr_class 5\ntotal_sv 50\nrho 1.00993 0.0826716 0.44923 0.122127 -0.124289 0.246611 -0.0848336 0.951644 0.951654 0.668556\nlabel 1 0 2 4 3\nprobA 1.51327 1.23895 0.615965 0.654086 1.13544 2.24274 0.010137 1.44331 1.48349 0.712718\nprobB 0.616656 0.815576 0.872403 0.977088 0.660094 2.0638 0.3 ......

When I do something like this
try:
result = cPickle.loads(a_object)
except orange.KernelException:
print 'error'
pass
print 'pass'

and run
>>>
error
error
error
pass
But sometimes it's just error forever. Do you know the reasons behind the kernel exception error? and How to fix it?
Thank you very much

Aonlazio

Fix report

Postby aonlazio » Mon Sep 21, 2009 3:14

Sorry

CHANGE


try:
result = cPickle.loads(a_object)
except orange.KernelException:
print 'error'
pass
print 'pass'


TO
Code: Select all
while True:
      try:
            result = cPickle.loads(a_object)
            break
      except orange.KernelException:
            print 'error'
print 'pass'

Thanks

Postby Ales » Wed Sep 23, 2009 10:56

Can you try the latest snapshot. I think it should work now.


Return to Questions & Support