install update with error

Asked by Yinfa Shen

Dear Olivier,
  When I try to use the command "install update", the bug appears:
Command "install update " interrupted in sub-command:
"install update" with error:
OSError : [Errno 17] File exists: '/home/syf/MG5_aMC_v2_8_2/UPDATE_TMP'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in 'MG5_debug'.
Please attach this file to your report.

And the debug_file is :
install update
Traceback (most recent call last):
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/extended_cmd.py", line 1541, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/extended_cmd.py", line 1490, in onecmd_orig
    return func(arg, **opt)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/master_interface.py", line 485, in do_install
    self.cmd.do_install(self, *args, **opts)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/madgraph_interface.py", line 6152, in do_install
    self.install_update(['update']+install_options['update_options'],wget=program)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/madgraph_interface.py", line 6888, in install_update
    need_binary = apply_patch(filetext)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/madgraph_interface.py", line 6612, in apply_patch
    shutil.copytree(pjoin(MG5DIR, orig), pjoin(MG5DIR, 'UPDATE_TMP'))
  File "/usr/lib/python2.7/shutil.py", line 200, in copytree
    os.makedirs(dst)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/home/syf/MG5_aMC_v2_8_2/UPDATE_TMP'
Related File: /home/syf/MG5_aMC_v2_8_2/UPDATE_TMP
                          MadGraph5_aMC@NLO Options
                          ----------------
        complex_mass_scheme : False
    default_unset_couplings : 99
                      gauge : unitary
         group_subprocesses : Auto
  ignore_six_quark_processes : False
           loop_color_flows : False
      loop_optimized_output : True
  low_mem_multicore_nlo_generation : False
     max_npoint_for_channel : 0
          max_t_for_channel : 99
               stdout_level : 20 (user set)
         zerowidth_tchannel : True

                         MadEvent Options
                          ----------------
     automatic_html_opening : True
                    nb_core : None
        notification_center : True
                   run_mode : 2

                      Configuration Options
                      ---------------------
                        OLP : MadLoop
                    amcfast : amcfast-config
                   applgrid : applgrid-config
                auto_update : 7
         cluster_local_path : None
           cluster_nb_retry : 1
              cluster_queue : None (user set)
         cluster_retry_wait : 300
               cluster_size : 100
      cluster_status_update : (600, 30)
          cluster_temp_path : None
               cluster_type : condor
                    collier : ./HEPTools/lib
               cpp_compiler : None
             crash_on_error : False
               delphes_path : ./Delphes
                 eps_viewer : None
        exrootanalysis_path : ./ExRootAnalysis
              f2py_compiler : None
          f2py_compiler_py2 : None
          f2py_compiler_py3 : None
                    fastjet : None (user set)
           fortran_compiler : None
                      golem : None (user set)
                 hepmc_path : None (user set)
                  hwpp_path : None (user set)
                     lhapdf : lhapdf-config
                 lhapdf_py2 : None
                 lhapdf_py3 : /home/syf/MG5_aMC_v2_8_2/HEPTools/lhapdf6_py3/bin/lhapdf-config (user set)
          madanalysis5_path : /home/syf/MG5_aMC_v2_8_2/HEPTools/madanalysis5/madanalysis5 (user set)
           madanalysis_path : ./MadAnalysis
  mg5amc_py8_interface_path : /home/syf/MG5_aMC_v2_8_2/HEPTools/MG5aMC_PY8_interface (user set)
                      ninja : ./HEPTools/lib
        output_dependencies : external
            pythia-pgs_path : ./pythia-pgs
               pythia8_path : /home/syf/MG5_aMC_v2_8_2/HEPTools/pythia8 (user set)
                    samurai : None
               syscalc_path : ./SysCalc
                    td_path : ./td
                text_editor : None
                thepeg_path : None (user set)
                    timeout : 60
                web_browser : None
I'll appreciate it if you can give me some advice.

Sincerely,
Yinfa

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Yinfa Shen
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

OSError: [Errno 17] File exists: '/home/syf/MG5_aMC_v2_8_2/UPDATE_TMP'

My guess:
There is some cruft from a previous upgrade attempt that has to be deleted first.

rm -rfv /home/syf/MG5_aMC_v2_8_2/UPDATE_TMP

and then try again.

Revision history for this message
Yinfa Shen (syf123) said :
#2

Dear Manfred,
  Thanks for your reply.
   I've taken your advice and try install update again.The previous problem doesn't appear but another problem appear:
   Command "install update " interrupted in sub-command:
"install update" with error:
TypeError : cannot use a string pattern on a bytes-like object

And the MG5_debug file is :
install update
Traceback (most recent call last):
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/extended_cmd.py", line 1541, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/extended_cmd.py", line 1490, in onecmd_orig
    return func(arg, **opt)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/master_interface.py", line 485, in do_install
    self.cmd.do_install(self, *args, **opts)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/madgraph_interface.py", line 6152, in do_install
    self.install_update(['update']+install_options['update_options'],wget=program)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/madgraph_interface.py", line 6888, in install_update
    need_binary = apply_patch(filetext)
  File "/home/syf/MG5_aMC_v2_8_2/madgraph/interface/madgraph_interface.py", line 6611, in apply_patch
    for orig, new in pattern.findall(text):
TypeError: cannot use a string pattern on a bytes-like object

What can I do ? I'm waiting your adivce.

Sincerely,
Yinfa

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Sorry, no idea, I hope somebody else can help with that, e.g. Olivier Mattelaer

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

Hi,

Thanks Manfred for the help. The second issue is a python3 issue that I guess is solved now (but the auto-update might take a while to have it 100% working with python3. So my advice is to use python2 to do the update via a command like
python2.7 ./bin/mg5

cheers,

Olivier

Revision history for this message
Yinfa Shen (syf123) said :
#5

Dear Oliver,
 I've solved the problem and updated the version completely. Thanks your reply.

Sincerely,
Yinfa

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

Excellent,

Thanks,

Olivier