auto update error

Asked by Sihyun Jeon

Hi MadGraph,

I've set "auto_update = 0 #" in the config file but it looks something is going wrong in MG297 (MG299 seems to avoid the problem as it is the newest one). Maybe some issues with string float conversions?

I ran this simple script below

import model SM_HeavyN_NLO
define ll = e+ mu+ ta+ e- mu- ta-
define vv = ve vm vt ve~ vm~ vt~
define qq = u d c s b u~ d~ c~ s~ b~
generate p p > t t~ [QCD]
#add process p p > t t~ j [QCD]
output TT01j
launch
shower=PYTHIA8

Checking if MG5 is up-to-date... (takes up to 5s)
************* INFORMATION *************
Even in those hard times, do not forget to have fun with physics
    Would you find all special the april fool this year?
************* INFORMATION *************
New Version of MG5 available! Do you want to update your current version? [n, y][60s to answer]
>n
Update bypassed.
Command "quit" interrupted with error:
TypeError : bad operand type for abs(): 'str'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in 'MG5_debug'.
Please attach this file to your report.
Checking if MG5 is up-to-date... (takes up to 5s)
************* INFORMATION *************
Even in those hard times, do not forget to have fun with physics
    Would you find all special the april fool this year?
************* INFORMATION *************
New Version of MG5 available! Do you want to update your current version? [n, y][60s to answer]
>n
Update bypassed.
Traceback (most recent call last):
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1541, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1490, in onecmd_orig
    return func(arg, **opt)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/master_interface.py", line 518, in do_quit
    return self.cmd.do_quit(self, *args, **opts)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 3081, in do_quit
    self.do_install('update --mode=mg5_end')
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/master_interface.py", line 485, in do_install
    self.cmd.do_install(self, *args, **opts)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 6189, in do_install
    self.install_update(['update']+install_options['update_options'],wget=program)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 6991, in install_update
    % abs(self.options['auto_update']))
TypeError: bad operand type for abs(): 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./bin/mg5_aMC", line 202, in <module>
    cmd_line.run_cmd('quit')
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1579, in run_cmd
    return self.exec_cmd(line, errorhandling=True, precmd=True)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1568, in exec_cmd
    stop = current_interface.onecmd(line, **opt)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1543, in onecmd
    return self.error_handling(error, line)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1532, in error_handling
    self.do_quit('all')
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/master_interface.py", line 518, in do_quit
    return self.cmd.do_quit(self, *args, **opts)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 3081, in do_quit
    self.do_install('update --mode=mg5_end')
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/master_interface.py", line 485, in do_install
    self.cmd.do_install(self, *args, **opts)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 6189, in do_install
    self.install_update(['update']+install_options['update_options'],wget=program)
  File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 6991, in install_update
    % abs(self.options['auto_update']))
TypeError: bad operand type for abs(): 'str'

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Can you check your file input/mg5_configuration.txt?
I have tested with 2.9.7 and did not face the issue.
Also I do not catch anything changing between 2.9.7 and 2.9.9 on that particular point

Cheers,

Olivier

> On 26 Feb 2022, at 11:20, Sihyun Jeon <email address hidden> wrote:
>
> New question #700746 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/700746
>
> Hi MadGraph,
>
> I've set "auto_update = 0 #" in the config file but it looks something is going wrong in MG297 (MG299 seems to avoid the problem as it is the newest one). Maybe some issues with string float conversions?
>
> I ran this simple script below
>
> import model SM_HeavyN_NLO
> define ll = e+ mu+ ta+ e- mu- ta-
> define vv = ve vm vt ve~ vm~ vt~
> define qq = u d c s b u~ d~ c~ s~ b~
> generate p p > t t~ [QCD]
> #add process p p > t t~ j [QCD]
> output TT01j
> launch
> shower=PYTHIA8
>
>
>
>
> Checking if MG5 is up-to-date... (takes up to 5s)
> ************* INFORMATION *************
> Even in those hard times, do not forget to have fun with physics
> Would you find all special the april fool this year?
> ************* INFORMATION *************
> New Version of MG5 available! Do you want to update your current version? [n, y][60s to answer]
>> n
> Update bypassed.
> Command "quit" interrupted with error:
> TypeError : bad operand type for abs(): 'str'
> Please report this bug on https://bugs.launchpad.net/mg5amcnlo
> More information is found in 'MG5_debug'.
> Please attach this file to your report.
> Checking if MG5 is up-to-date... (takes up to 5s)
> ************* INFORMATION *************
> Even in those hard times, do not forget to have fun with physics
> Would you find all special the april fool this year?
> ************* INFORMATION *************
> New Version of MG5 available! Do you want to update your current version? [n, y][60s to answer]
>> n
> Update bypassed.
> Traceback (most recent call last):
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1541, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1490, in onecmd_orig
> return func(arg, **opt)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/master_interface.py", line 518, in do_quit
> return self.cmd.do_quit(self, *args, **opts)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 3081, in do_quit
> self.do_install('update --mode=mg5_end')
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/master_interface.py", line 485, in do_install
> self.cmd.do_install(self, *args, **opts)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 6189, in do_install
> self.install_update(['update']+install_options['update_options'],wget=program)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 6991, in install_update
> % abs(self.options['auto_update']))
> TypeError: bad operand type for abs(): 'str'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "./bin/mg5_aMC", line 202, in <module>
> cmd_line.run_cmd('quit')
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1579, in run_cmd
> return self.exec_cmd(line, errorhandling=True, precmd=True)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1568, in exec_cmd
> stop = current_interface.onecmd(line, **opt)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1543, in onecmd
> return self.error_handling(error, line)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/extended_cmd.py", line 1532, in error_handling
> self.do_quit('all')
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/master_interface.py", line 518, in do_quit
> return self.cmd.do_quit(self, *args, **opts)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 3081, in do_quit
> self.do_install('update --mode=mg5_end')
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/master_interface.py", line 485, in do_install
> self.cmd.do_install(self, *args, **opts)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 6189, in do_install
> self.install_update(['update']+install_options['update_options'],wget=program)
> File "/data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/madgraph/interface/madgraph_interface.py", line 6991, in install_update
> % abs(self.options['auto_update']))
> TypeError: bad operand type for abs(): 'str'
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Sihyun Jeon (shjeon) said :
#2

#! Prefered Fortran Compiler
#! If None: try to find g77 or gfortran on the system
#!
# fortran_compiler = None
# f2py_compiler_py2 = None
# f2py_compiler_py3 = None

#! Prefered C++ Compiler
#! If None: try to find g++ or clang on the system
#!
# cpp_compiler = None

#! Prefered Text Editor
#! Default: use the shell default Editor
#! or try to find one available on the system
#! Be careful: Only shell based editor are allowed
# text_editor = None

#! Prefered WebBrower
#! If None: try to find one available on the system
# web_browser = None

#! Prefered PS viewer
#! If None: try to find one available on the system
# eps_viewer = None

#! Time allowed to answer question (if no answer takes default value)
#! 0: No time limit
# timeout = 60

#! Pythia8 path.
#! Defines the path to the pythia8 installation directory (i.e. the
#! on containing the lib, bin and include directories) .
#! If using a relative path, that starts from the mg5 directory
pythia8_path = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/HEPTools/pythia8 #

#! MG5aMC_PY8_interface path
#! Defines the path of the C++ driver file that is used by MG5_aMC to
#! steer the Pythia8 shower.
#! Can be installed directly from within MG5_aMC with the following command:
#! MG5_aMC> install mg5amc_py8_interface
mg5amc_py8_interface_path = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/HEPTools/MG5aMC_PY8_interface #

#! Herwig++/Herwig7 paths
#! specify here the paths also to HepMC ant ThePEG
#! define the path to the herwig++, thepeg and hepmc directories.
#! paths can be absolute or relative from mg5 directory
#! WARNING: if Herwig7 has been installed with the bootstrap script,
#! then please set thepeg_path and hepmc_path to the same value as
#! hwpp_path
hwpp_path = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/None #
thepeg_path = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/None #
hepmc_path = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/None #

#! Control when MG5 checks if he is up-to-date.
#! Enter the number of day between two check (0 means never)
#! A question is always asked before any update
auto_update = 0 #

################################################################################
# INFO FOR MADEVENT / aMC@NLO
################################################################################
# If this file is in a MADEVENT Template. 'main directory' is the directory
# containing the SubProcesses directory. Otherwise this is the MadGraph5_aMC@NLO main
# directory (containing the directories madgraph and Template)

#! Allow/Forbid the automatic opening of the web browser (on the status page)
#! when launching MadEvent [True/False]
automatic_html_opening = False #
#! allow notification of finished job in the notification center (Mac Only)
# notification_center = True

#! Default Running mode
#! 0: single machine/ 1: cluster / 2: multicore
# run_mode = 2

#! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only
#! And cluster queue (or partition for slurm)
#! And size of the cluster (some part of the code can adapt splitting accordingly)
# cluster_type = condor
# cluster_queue = madgraph
# cluster_size = 150

#! Path to a node directory to avoid direct writing on the central disk
#! Note that condor clusters avoid direct writing by default (therefore this
#! options does not affect condor clusters)
# cluster_temp_path = None

#! path to a node directory where local file can be found (typically pdf)
#! to avoid to send them to the node (if cluster_temp_path is on True or condor)
# cluster_local_path = None # example: /cvmfs/cp3.uclouvain.be/madgraph/

#! Cluster waiting time for status update
#! First number is when the number of waiting job is higher than the number
#! of running one (time in second). The second number is in the second case.
# cluster_status_update = 600 30

#! How to deal with failed submission (can occurs on cluster mode)
#! 0: crash, -1: print error, hangs the program up to manual instructions, N(>0) retry up to N times.
# cluster_nb_retry = 1

#! How much time to wait for the output file before resubmission/crash (filesystem can be very slow)
# cluster_retry_wait = 300

#! Nb_core to use (None = all) This is use only for multicore run
#! This correspond also to the number core used for code compilation for cluster mode
# nb_core = None

#! Pythia-PGS Package
#! relative path start from main directory
# pythia-pgs_path = ./pythia-pgs

#! Delphes Package
#! relative path start from main directory
# delphes_path = ./Delphes

#! MadAnalysis4 fortran-based package [for basic analysis]
#! relative path start from main directory
# madanalysis_path = ./MadAnalysis

#! MadAnalysis5 python-based Package [For advanced analysis]
#! relative path start from main directory
madanalysis5_path = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/None #

#! ExRootAnalysis Package
#! relative path start from main directory
# exrootanalysis_path = ./ExRootAnalysis

#! TOPDRAWER PATH
#! Path to the directory containing td executables
#! relative path start from main directory
# td_path = ./td

#! lhapdf-config --can be specify differently depending of your python version
#! If None: try to find one available on the system
# lhapdf_py2 = lhapdf-config
lhapdf_py3 = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/HEPTools/lhapdf6_py3/bin/lhapdf-config #

#! fastjet-config
#! If None: try to find one available on the system
fastjet = None #

#! MCatNLO-utilities
#! relative path starting from main directory
# MCatNLO-utilities_path = ./MCatNLO-utilities

#! Set what OLP to use for the loop ME generation
# OLP = MadLoop

#! Set the PJFRy++ directory containing pjfry's library
#! if auto: try to find it automatically on the system (default)
#! if '' or None: disabling pjfry
#! if pjfry=/PATH/TO/pjfry/lib: use that specific installation path for PJFry++
# pjfry = auto

#! Set the Golem95 directory containing golem's library
#! It only supports version higher than 1.3.0
#! if auto: try to find it automatically on the system (default)
#! if '' or None: disabling Golem95
#! if golem=/PATH/TO/golem/lib: use that speficif installation path for Golem95
golem = None #

#! Set the samurai directory containing samurai's library
#! It only supports version higher than 2.0.0
#! if auto: try to find it automatically on the system (default)
#! if '' or None: disabling samurai
#! if samurai=/PATH/TO/samurai/lib: use that specific installation path for samurai
# samurai = None

#! Set the Ninja directory containing ninja's library
#! if '' or None: disabling ninja
#! if ninja=/PATH/TO/ninja/lib: use that specific installation path for ninja
ninja = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/HEPTools/lib #

#! Set the COLLIER directory containing COLLIER's library
#! if '' or None: disabling COLLIER
#! if ninja=/PATH/TO/ninja/lib: use that specific installation path for COLLIER
# Note that it is necessary that you have generated a static library for COLLIER
collier = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7/HEPTools/lib #

#! Set how MadLoop dependencies (such as CutTools) should be handled
#! > external : ML5 places a link to the MG5_aMC-wide libraries
#! > internal : ML5 copies all dependencies in the output so that it is independent
#! > environment_paths : ML5 searches for the dependencies in your environment path
# output_dependencies = external

#! SysCalc PATH
#! Path to the directory containing syscalc executables
#! relative path start from main directory
# syscalc_path = ./SysCalc

#! Absolute paths to config scripts in the bin directories for APPLgrid and aMCFast.
# applgrid = applgrid-config
# amcfast = amcfast-config

auto_convert_model = True

# MG5 MAIN DIRECTORY
mg5_path = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7

# MG5 MAIN DIRECTORY
mg5_path = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7

# MG5 MAIN DIRECTORY
mg5_path = /data9/Users/shjeon/THESIS_PROJECTS/PHENO/ttbar_TypeI/MG5_aMC_v2_9_7

Revision history for this message
Sihyun Jeon (shjeon) said :
#3

I don't really see anything odd with my config input file... do you?

The reason I mentioned 299 was because as 299 is the latest release (for LTS versions) I think MadGraph automatically skips the auto update module thus, I don't see any errors in 299 as well.

I changed
% abs(self.options['auto_update']))

to
% abs(int(self.options['auto_update'])))

and now it works fine without crash

But I still don't understand this behavior. I already have auto_update set to 0 in config file but it's still asking me if I want to update MadGraph. "Putting X to zero will prevent this check at anytime." -> This message seems to say that auto_update=0 will make MadGraph avoid such questions, no?

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Sihyun Jeon (shjeon) said :
#5

Hmm should I just ignore this?

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#6

Since it seems fixed in 2.9.9 I would not spend too much energy on this...

Cheers,

Olivier

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#7

So after some offline discussion, I'm now able to reproduce the issue.
So I'm invstigating

Cheers,

Olivier

Revision history for this message
Best Olivier Mattelaer (olivier-mattelaer) said :
#8
Revision history for this message
Sihyun Jeon (shjeon) said :
#9

Thanks!

Revision history for this message
Sihyun Jeon (shjeon) said :
#10

Thanks Olivier Mattelaer, that solved my question.