Command "generate_events run_01" interrupted with error: TypeError : gzip() got an unexpected keyword argument 'keep'

Bug #1684289 reported by Boudinar Fatima
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Unassigned

Bug Description

Hi
I'm generating the p p > t t~ w+ process and while runnig it shows
Command "generate_events run_01" interrupted with error:
TypeError : gzip() got an unexpected keyword argument 'keep'

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi,

Please attach the debug file, this will contain the information that we need to fix such problem.
Cheers and thanks,

Olivier

Revision history for this message
Boudinar Fatima (fatima17) wrote : Re: [Bug 1684289] Re: Command "generate_events run_01" interrupted with error: TypeError : gzip() got an unexpected keyword argument 'keep'

Dear Olivier
here is the debug file.
Best.

2017-04-20 0:25 GMT+02:00 Olivier Mattelaer <email address hidden>
:

> Hi,
>
> Please attach the debug file, this will contain the information that we
> need to fix such problem.
> Cheers and thanks,
>
> Olivier
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1684289
>
> Title:
> Command "generate_events run_01" interrupted with error: TypeError :
> gzip() got an unexpected keyword argument 'keep'
>
> Status in MadGraph5_aMC@NLO:
> New
>
> Bug description:
> Hi
> I'm generating the p p > t t~ w+ process and while runnig it shows
> Command "generate_events run_01" interrupted with error:
> TypeError : gzip() got an unexpected keyword argument 'keep'
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mg5amcnlo/+bug/1684289/+subscriptions
>

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Thanks,

Looks like a problem in the pythia8 interface.
Here is the patch:
=== modified file 'madgraph/interface/madevent_interface.py'
--- madgraph/interface/madevent_interface.py 2017-04-12 13:04:38 +0000
+++ madgraph/interface/madevent_interface.py 2017-04-26 07:32:09 +0000
@@ -1066,7 +1066,7 @@
         input_file = pjoin(self.me_dir,'Events',self.run_name, 'unweighted_events.lhe')
         if not os.path.exists('%s.gz'%input_file):
             if os.path.exists(input_file):
- misc.gzip(input_file, keep=True, stdout='%s.gz'%input_file)
+ misc.gzip(input_file, stdout='%s.gz'%input_file)
             else:
                 raise self.InvalidCmd('No event file corresponding to %s run. '
                                                                 % self.run_name)

Thanks,

Olivier

Changed in mg5amcnlo:
status: New → Fix Committed
Changed in mg5amcnlo:
status: Fix Committed → Fix Released
Revision history for this message
Jacky (singlajacky) wrote :

Hi Olivier,

I have got a similar bug...

Command "generate_events run_01" interrupted with error:
TypeError : gzip() got an unexpected keyword argument 'keep'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/bin/0nunub_30_106/run_01_tag_1_debug.log'.
Please attach this file to your report.

and here is log file:

generate_events run_01
Traceback (most recent call last):
  File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/extended_cmd.py", line 1514, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/extended_cmd.py", line 1463, in onecmd_orig
    return func(arg, **opt)
  File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/madevent_interface.py", line 2469, in do_generate_events
    self.run_generate_events(switch_mode, args)
  File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/common_run_interface.py", line 6961, in new_fct
    original_fct(obj, *args, **opts)
  File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/madevent_interface.py", line 2573, in run_generate_events
    self.create_root_file(input , output)
  File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/madevent_interface.py", line 5971, in create_root_file
    misc.gzip(input,keep=False)
TypeError: gzip() got an unexpected keyword argument 'keep'

To me, it seems to be a problem related to ExRootAnalysis. Please have a look.

Best regards,
Jacky

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1684289] Command "generate_events run_01" interrupted with error: TypeError : gzip() got an unexpected keyword argument 'keep'

Thanks,

This will be fixed in the next release.

Cheers,

Olivier

> On 4 Dec 2019, at 15:34, Jacky <email address hidden> wrote:
>
> Hi Olivier,
>
> I have got a similar bug...
>
>
> Command "generate_events run_01" interrupted with error:
> TypeError : gzip() got an unexpected keyword argument 'keep'
> Please report this bug on https://bugs.launchpad.net/mg5amcnlo
> More information is found in '/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/bin/0nunub_30_106/run_01_tag_1_debug.log'.
> Please attach this file to your report.
>
>
> and here is log file:
>
> generate_events run_01
> Traceback (most recent call last):
> File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/extended_cmd.py", line 1514, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/extended_cmd.py", line 1463, in onecmd_orig
> return func(arg, **opt)
> File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/madevent_interface.py", line 2469, in do_generate_events
> self.run_generate_events(switch_mode, args)
> File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/common_run_interface.py", line 6961, in new_fct
> original_fct(obj, *args, **opts)
> File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/madevent_interface.py", line 2573, in run_generate_events
> self.create_root_file(input , output)
> File "/home/kumar/Documents/tools/MG5_aMC_v2.6.7/MG5_aMC_v2_6_7/madgraph/interface/madevent_interface.py", line 5971, in create_root_file
> misc.gzip(input,keep=False)
> TypeError: gzip() got an unexpected keyword argument 'keep'
>
> To me, it seems to be a problem related to ExRootAnalysis. Please have a
> look.
>
> Best regards,
> Jacky
>
> --
> You received this bug notification because you are subscribed to
> MadGraph5_aMC@NLO.
> https://bugs.launchpad.net/bugs/1684289
>
> Title:
> Command "generate_events run_01" interrupted with error: TypeError :
> gzip() got an unexpected keyword argument 'keep'
>
> Status in MadGraph5_aMC@NLO:
> Fix Released
>
> Bug description:
> Hi
> I'm generating the p p > t t~ w+ process and while runnig it shows
> Command "generate_events run_01" interrupted with error:
> TypeError : gzip() got an unexpected keyword argument 'keep'
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mg5amcnlo/+bug/1684289/+subscriptions

Revision history for this message
Roshan Mammen Abraham (rmammen) wrote :

Hey,

This error occured to me too. I am using 2.6.7. Was the fix included in this version?

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

The bug report was about 2.6.7. So 2.6.7 is indeed impacted by that bug.

Olivier

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.