need helping tracking down weird bug in cPickle

  • Thread starter Carl J. Van Arsdall
  • Start date
C

Carl J. Van Arsdall

Hey everyone, cPickle is raising an ImportError that I just don't quite
understand. Before I paste the code, let me explain the application.
Basically the part of the application that failed is a function that
loads a list of objects from a file using cPickle. This list is a queue
of requests. I've done some research and it looks like cPickle tries to
load some modules as some kind of test. From what I can tell the module
that cPickle is trying to load is a concatenation of the module that it
exists in and part of the string that was sent in the orignal request.

It looks like something where memory is getting overwritten, but I'm not
really doing anything too fancy, so i'm not sure how to approach this
problem. I'm using python2.2. Does anyone know how I might go about
trying to troubleshoot something like this? Is there a good tool or a
better method of error handling I can use to try and track this down?
Or is it better to give up troubleshooting and just upgrade to 2.4?

Here's the code where the error occured:

def initQueue():
global masterQueue
try:
queueFPtr = open("/home/build/bin/resourceManager/queue.rm","rb")
except IOError:
raise ResourceError,"Error Opening Queue for Reading"
except:
traceback.print_exc()
raise ResourceError, "Unknown Error Opening Queue"

try:
pickledList = cPickle.load(queueFPtr)
except EOFError:
masterQueue = [[],[],[]] #empty file, set to empty list for construction
#there exist 3 blank lists in the master list, these list refer to
various priorities 0, 1, and 2
queueFPtr.close()
return
except:
traceback.print_exc()
raise ResourceError, "Unknown Error loading Queue"
queueFPtr.close()
masterQueue = pickledList
return


Here's the traceback:

Traceback (most recent call last):
File "/home/build/bin/resourceManager/resourceQueue.py", line 50, in
initQueue
pickledList = cPickle.load(queueFPtr)
ImportError: No module named resourcepmdb'
Traceback (most recent call last):
File "./installimage.py", line 443, in ?
rpmdb = getResource(buildtag,buildid,"dumborpmdb","Installing
installer
rpms")
File "/home/build/bin/resourceManager/resourceManager.py", line 39, in
getResource
resourceQueue.initQueue()
File "/home/build/bin/resourceManager/resourceQueue.py", line 58, in
initQueue
raise ResourceError, "Unknown Error loading Queue"
resourceError.ResourceError: Unknown Error loading Queue






--

Carl J. Van Arsdall
(e-mail address removed)
Build and Release
MontaVista Software
 
S

Scott David Daniels

Carl said:
Hey everyone, cPickle is raising an ImportError that I just don't quite
understand. Before I paste the code, let me explain the application.
Basically the part of the application that failed is a function that
loads a list of objects from a file using cPickle....

Loading and unloading Floating Point NaNs (Not a Numbers) is often the
source of such problems. I'd look for something like that.
They can displays as: (Inf, Ind, NaN, SNaN, QNaN) w/ or w/o a sign.
Depending on your runtimes, processor, OS, and sometimes program history
(flag manipulation), you can get these values in different ways.

--Scott David Daniels
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top