Comment 2 for bug 1697656

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

Hi Stefan,

Thanks for pointing this to us. I have found a linux machine on which I reproduce the problem.
and here is the associate fix:

=== modified file 'madgraph/various/lhe_parser.py'
--- madgraph/various/lhe_parser.py 2017-05-03 09:21:01 +0000
+++ madgraph/various/lhe_parser.py 2017-06-15 12:06:35 +0000
@@ -174,6 +174,10 @@
     def __init__(self, path, mode='r', *args, **opt):
         """open file and read the banner [if in read mode]"""

+ if path.endswith('.gz') and mode == 'w' and\
+ isinstance(self, EventFileNoGzip):
+ path = path[:-3]
+
         self.parsing = True # check if/when we need to parse the event.
         self.eventgroup = False
         try:

Thanks,

Olivier