Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to ctapipe master, fixes #5 #6

Merged
merged 1 commit into from
Mar 15, 2019
Merged

Adapt to ctapipe master, fixes #5 #6

merged 1 commit into from
Mar 15, 2019

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented Mar 14, 2019

No description provided.

@dneise
Copy link
Member

dneise commented Mar 15, 2019

should we just merge this?

@kosack kosack merged commit b14bd2f into master Mar 15, 2019
@maxnoe
Copy link
Member Author

maxnoe commented Mar 15, 2019

No, we need at least 10 approvals! 😄

@maxnoe maxnoe deleted the fix_traitlets branch March 15, 2019 16:20
@FrancaCassol
Copy link
Collaborator

Thanks Max,

Now I have the following error, but not time to look at it in detail right now (perhaps it comes from me):

TraitError                                Traceback (most recent call last)
<ipython-input-8-0f1913781b4d> in <module>()
      1 #
----> 2 flatfield_tool.run(argv=['--config','/astro/users/cassol/soft/python/cta-lstchain/lstchain/tools/flatfield_param.json'])

/scratch4/franca/soft/ctapipe/ctapipe/core/tool.py in run(self, argv)
    163             Provenance().start_activity(self.name)
    164             Provenance().add_config(self.config)
--> 165             self.setup()
    166             self.is_setup = True
    167             self.start()

~/soft/python/cta-lstchain/lstchain/tools/calc_flatfield.py in setup(self)
     69     def setup(self):
     70         kwargs = dict(config=self.config, tool=self)
---> 71         self.eventsource = EventSource.from_config(**kwargs)
     72         self.flatfield = FlatFieldCalculator.from_name(
     73             self.calculator_product,

/scratch4/franca/soft/ctapipe/ctapipe/io/eventsource.py in from_config(cls, config, parent, **kwargs)
    285             config.EventSource.input_url,
    286             config=config,
--> 287             **kwargs
    288         )

/scratch4/franca/soft/ctapipe/ctapipe/io/eventsource.py in event_source(input_url, **kwargs)
     34         Instance of a compatible EventSource subclass
     35     """
---> 36     return EventSource.from_url(input_url, **kwargs)
     37 
     38 

/scratch4/franca/soft/ctapipe/ctapipe/io/eventsource.py in from_url(cls, input_url, **kwargs)
    245         for subcls in available_classes:
    246             if subcls.is_compatible(input_url):
--> 247                 return subcls(input_url=input_url, **kwargs)
    248 
    249         raise ValueError(

/scratch4/franca/soft/ctapipe_io_lst/ctapipe_io_lst/__init__.py in __init__(self, **kwargs)
     56             self.file_list.sort()
     57             kwargs['input_url'] = self.file_list[0]
---> 58             super().__init__(**kwargs)
     59         else:
     60             super().__init__(**kwargs)

/scratch4/franca/soft/ctapipe/ctapipe/io/eventsource.py in __init__(self, config, parent, **kwargs)
    142         kwargs
    143         """
--> 144         super().__init__(config=config, parent=parent, **kwargs)
    145 
    146         self.metadata = dict(is_simulation=False)

/scratch4/franca/soft/ctapipe/ctapipe/core/component.py in __init__(self, config, parent, **kwargs)
    100         for key, value in kwargs.items():
    101             if not self.has_trait(key):
--> 102                 raise TraitError(f"Traitlet does not exist: {key}")
    103 
    104         # set up logging

TraitError: Traitlet does not exist: tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants