While the pybindings are working on macos with icesim V05-00-07, I experience some issues when using ubuntu.
TypeError: No to_python (by-value) converter found
For example, when running ./generateTestFlashesSC.py of the StandardCandle script I get
Traceback (most recent call last):
File "./generateTestFlashesSC.py", line 32, in <module>
from icecube import icetray, dataclasses, dataio, phys_services, clsim, sim_services
TypeError: No to_python (by-value) converter found for C++ type: I3Map<OMKey, std::vector<I3MCPE, std::allocator<I3MCPE> > >
when the python modules are imported like usual in this script: from icecube import icetray, dataclasses, dataio, phys_services, clsim, sim_services.
When I change this to
from icecube import icetray, dataclasses, simclasses
from icecube import dataio
from icecube import phys_services, sim_services
from icecube import clsim
the above issue is gone. I had to split-up the imports and to import simclasses as well.
But this leads to an even stranger issue:
AttributeError: 'module' object has no attribute 'StandardCandleFlasherPulseSeriesGenerator'
When changing the import as shown above, calling ./generateTestFlashesSC.py leads to:
Traceback (most recent call last):
File "./generateTestFlashesSC.py", line 63, in <module>
tray.AddModule(clsim.StandardCandleFlasherPulseSeriesGenerator, "StandardCandleFlasherPulseSeriesGenerator",
AttributeError: 'module' object has no attribute 'StandardCandleFlasherPulseSeriesGenerator'
And, sure enough, if I try to inspect clsim, StandardCandleFlasherPulseSeriesGenerator as well as some other stuff from https://github.com/claudiok/clsim/blob/master/python/__init__.py is missing.
>>> print dir(clsim)
['I3CLSimEventStatistics', 'I3CLSimFlasherPulse', 'I3CLSimFlasherPulseSeries', 'I3CompressedPhoton', 'I3CompressedPhotonSeries', 'I3CompressedPhotonSeriesMap', 'I3ExtraGeometryItem', 'I3ExtraGeometryItemConstPtrVect', 'I3ExtraGeometryItemCylinder', 'I3ExtraGeometryItemMove', 'I3ExtraGeometryItemUnion', 'I3Photon', 'I3PhotonSeries', 'I3PhotonSeriesMap', 'I3ShadowedPhotonRemover', '__doc__', '__file__', '__name__', '__package__', 'converters', 'std_map_indexing_suite_I3CompressedPhotonSeriesMap_entry', 'std_map_indexing_suite_I3PhotonSeriesMap_entry']
How to reproduce
The easiest way to reproduce this is using the ubuntu-icecube-soft docker image. This uses icesim V05-00-00, but I've also installed V05-00-07 with the same result.
docker run -it tpalczew/ubuntu-icecube-soft bash
cd /icesim/V05-00-00/build
source env-shell.sh
cd /icesim/V05-00-00/src/clsim/resources/scripts/flasher/StandardCandle
./generateTestFlashesSC.py
While the pybindings are working on macos with icesim V05-00-07, I experience some issues when using ubuntu.
TypeError: No to_python (by-value) converter found
For example, when running
./generateTestFlashesSC.pyof the StandardCandle script I getwhen the python modules are imported like usual in this script:
from icecube import icetray, dataclasses, dataio, phys_services, clsim, sim_services.When I change this to
the above issue is gone. I had to split-up the imports and to import
simclassesas well.But this leads to an even stranger issue:
AttributeError: 'module' object has no attribute 'StandardCandleFlasherPulseSeriesGenerator'
When changing the import as shown above, calling
./generateTestFlashesSC.pyleads to:And, sure enough, if I try to inspect
clsim,StandardCandleFlasherPulseSeriesGeneratoras well as some other stuff from https://github.com/claudiok/clsim/blob/master/python/__init__.py is missing.How to reproduce
The easiest way to reproduce this is using the ubuntu-icecube-soft docker image. This uses icesim V05-00-00, but I've also installed V05-00-07 with the same result.