nb_event undefined in systematics.py

Bug #1860747 reported by Zachary Marshall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Invalid
Undecided
Unassigned

Bug Description

Hi,

In the run(self, stdout=sys.stdout) function in systematics.py , there's a sequence that looks like this:

        for nb_event,event in enumerate(self.input):
            stuff()
        else:
            self.output.write('</LesHouchesEvents>\n')
        self.output.close()
        self.print_cross_sections(all_cross, min(nb_event,self.stop_event)-self.start_event+1, stdout)

In the case that self.input is an empty list, nb_event is not defined, and the job crashes. It's a weird situation in which that happens, but it could be handled with a quick and easy error message to avoid the crash.

Thanks,
Zach

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1860747] [NEW] nb_event undefined in systematics.py

Well, in that case we should have a crash (but ok we might one a clear one).
Do you have a reason to not have a crash here?

Cheers,

Olivier

> On 24 Jan 2020, at 07:12, Zachary Marshall <email address hidden> wrote:
>
> Public bug reported:
>
> Hi,
>
> In the run(self, stdout=sys.stdout) function in systematics.py , there's
> a sequence that looks like this:
>
> for nb_event,event in enumerate(self.input):
> stuff()
> else:
> self.output.write('</LesHouchesEvents>\n')
> self.output.close()
> self.print_cross_sections(all_cross, min(nb_event,self.stop_event)-self.start_event+1, stdout)
>
> In the case that self.input is an empty list, nb_event is not defined,
> and the job crashes. It's a weird situation in which that happens, but
> it could be handled with a quick and easy error message to avoid the
> crash.
>
> Thanks,
> Zach
>
> ** Affects: mg5amcnlo
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> MadGraph5_aMC@NLO.
> https://bugs.launchpad.net/bugs/1860747
>
> Title:
> nb_event undefined in systematics.py
>
> Status in MadGraph5_aMC@NLO:
> New
>
> Bug description:
> Hi,
>
> In the run(self, stdout=sys.stdout) function in systematics.py ,
> there's a sequence that looks like this:
>
> for nb_event,event in enumerate(self.input):
> stuff()
> else:
> self.output.write('</LesHouchesEvents>\n')
> self.output.close()
> self.print_cross_sections(all_cross, min(nb_event,self.stop_event)-self.start_event+1, stdout)
>
> In the case that self.input is an empty list, nb_event is not defined,
> and the job crashes. It's a weird situation in which that happens, but
> it could be handled with a quick and easy error message to avoid the
> crash.
>
> Thanks,
> Zach
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mg5amcnlo/+bug/1860747/+subscriptions

Changed in mg5amcnlo:
status: New → Incomplete
Changed in mg5amcnlo:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.