rootpy/rootpy — Issue #9: classfactory crashes if old lib file disappears
Author: ekfriis
Created: 2012-03-08 10:02:20+00:00
State: open

Hello,

I deleted an old release area (and it's associated libs). I had previously used roosh etc to browse the CMSSW files, and classfactory cached the libraries. Now if I open any old file in roosh I get:

Message: (file "/afs/hep.wisc.edu/home/efriis/.rootpy/dicts/334598/4c6661edd304453ea4e66a622924e0b9.so", line -1) dlopen error: /afs/hep.wisc.edu/user/efriis/cmssw/Analysis/lib/slc5_amd64_gcc434/libDataFormatsPatCandidates.so: cannot open shared object file: No such file or directory

which indeed doesn't exist. The whole traceback is below.

I fixed the crash by nuking my ~/.rootpy directory. I'm not sure what the best behavior is.

Cheers
Evan

Message: (file "/afs/hep.wisc.edu/home/efriis/.rootpy/dicts/334598/4c6661edd304453ea4e66a622924e0b9.so", line -1) dlopen error: /afs/hep.wisc.edu/user/efriis/cmssw/Analysis/lib/slc5
_amd64_gcc434/libDataFormatsPatCandidates.so: cannot open shared object file: No such file or directory
Traceback (most recent call last): File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/bin/roosh", line 5, in
pkg_resources.run_script('rootpy==0.6', 'roosh')
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/EGG-INFO/scripts/roosh", line 1
8, in
from rootpy.io import open as ropen, utils
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/io/__init__.py", line 1,
in
from .file import *
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/io/file.py", line 7, in

from ..utils import asrootpy
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/utils.py", line 3, in
from .plotting.core import Plottable
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/plotting/__init__.py", l
ine 1, in
from .hist import Hist, Hist2D, Hist3D, HistStack
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/plotting/hist.py", line
4, in
from ..objectproxy import ObjectProxy
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/objectproxy.py", line 1,
in
import types
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/types.py", line 430, in

generate('vector >', '')
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/classfactory.py", line 4
5, in generate
if ROOT.gSystem.Load("%s.so"% __lookup_table[unique_name]) in (0, 1):
RuntimeError: (file "/afs/hep.wisc.edu/home/efriis/.rootpy/dicts/334598/4c6661edd304453ea4e66a622924e0b9.so", line -1) Failed to load Dynamic link library /afs/hep.wisc.edu/home/efr
iis/.rootpy/dicts/334598/4c6661edd304453ea4e66a622924e0b9.so