TypeError : 'LexToken' object has no attribute '__getitem__'

Bug #1672237 reported by Jianwen Zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Invalid
Undecided
Unassigned

Bug Description

Hi, Oliver,

I encounted some troubles When I using MadGraph.

This is the MG5_debug file:
#************************************************************
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 2.3.3 2015-10-25 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadGraph5_aMC@NLO *
#* *
#* run as ./bin/mg5_aMC filename *
#* *
#************************************************************
set group_subprocesses Auto
set ignore_six_quark_processes False
set loop_color_flows False
set gauge unitary
set complex_mass_scheme False
set max_npoint_for_channel 0
import model sm
define p = g u c d s u~ c~ d~ s~
define j = g u c d s u~ c~ d~ s~
define l+ = e+ mu+
define l- = e- mu-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
import model GM
generate g g > H5pp H5pp~ [QCD]
output ggH5H5
Traceback (most recent call last):
  File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/extended_cmd.py", line 908, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/extended_cmd.py", line 897, in onecmd_orig
    return func(arg, **opt)
  File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/master_interface.py", line 284, in do_output
    self.cmd.do_output(self, line, *args, **opts)
  File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/madgraph_interface.py", line 6687, in do_output
    self.finalize(nojpeg, flaglist=flaglist)
  File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/madgraph_interface.py", line 6984, in finalize
    wanted_couplings)
  File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/loop/loop_exporters.py", line 332, in convert_model_to_mg4
    wanted_lorentz = wanted_lorentz, wanted_couplings = wanted_couplings)
  File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/iolibs/export_v4.py", line 3188, in convert_model_to_mg4
    wanted_lorentz, wanted_couplings)
  File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/iolibs/export_v4.py", line 772, in convert_model_to_mg4
    aloha_model.compute_subset(wanted_lorentz)
  File "/home/zjw/software/MG5_aMC_v2_3_3/aloha/create_aloha.py", line 907, in compute_subset
    self.compute_aloha(builder, routines=routines)
  File "/home/zjw/software/MG5_aMC_v2_3_3/aloha/create_aloha.py", line 986, in compute_aloha
    wavefunction = builder.compute_routine(outgoing, tag)
  File "/home/zjw/software/MG5_aMC_v2_3_3/aloha/create_aloha.py", line 162, in compute_routine
    self.expr = self.compute_aloha_high_kernel(mode, factorize)
  File "/home/zjw/software/MG5_aMC_v2_3_3/aloha/create_aloha.py", line 283, in compute_aloha_high_kernel
    lorentz = self.parse_expression()
  File "/home/zjw/software/MG5_aMC_v2_3_3/aloha/create_aloha.py", line 259, in parse_expression
    lorentz_expr = calc.parse(expr)
  File "/home/zjw/software/MG5_aMC_v2_3_3/aloha/aloha_parsers.py", line 58, in parse
    yacc.parse(buf)
  File "/home/zjw/software/MG5_aMC_v2_3_3/vendor/ply/yacc.py", line 270, in parse
    return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
  File "/home/zjw/software/MG5_aMC_v2_3_3/vendor/ply/yacc.py", line 1052, in parseopt_notrack
    tok = self.errorfunc(errtoken)
  File "/home/zjw/software/MG5_aMC_v2_3_3/aloha/aloha_parsers.py", line 191, in p_error
    print p[:]
TypeError: 'LexToken' object has no attribute '__getitem__'
                          MadGraph5_aMC@NLO Options
                          ----------------
        complex_mass_scheme : False
                      gauge : unitary
         group_subprocesses : Auto
  ignore_six_quark_processes : False
           loop_color_flows : False
      loop_optimized_output : True
     max_npoint_for_channel : 0
               stdout_level : 20 (user set)

                         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 : /cvmfs/cp3.uclouvain.be/madgraph/
           cluster_nb_retry : 1
              cluster_queue : None
         cluster_retry_wait : 300
               cluster_size : 100
      cluster_status_update : (600, 30)
          cluster_temp_path : None
               cluster_type : condor
               cpp_compiler : None
               delphes_path : ./Delphes
                 eps_viewer : None
        exrootanalysis_path : ./ExRootAnalysis
              f2py_compiler : None
                    fastjet : None (user set)
           fortran_compiler : None
                      golem : None (user set)
                 hepmc_path : None (user set)
                  hwpp_path : None (user set)
                     lhapdf : /home/zjw/software/hhh/LHAPDF613/bin/lhapdf-config (user set)
           madanalysis_path : ./MadAnalysis
        output_dependencies : external
                      pjfry : None (user set)
            pythia-pgs_path : ./pythia-pgs
               pythia8_path : None (user set)
               syscalc_path : ./SysCalc
                    td_path : ./td
                text_editor : None
                thepeg_path : None (user set)
                    timeout : 60
                web_browser : None

And when I tye to output the process, these words were printed:

INFO: initialize a new directory: ggH5H5
INFO: remove old information in ggH5H5
INFO: Organizing processes into subprocess groups
INFO: Generating Helas calls for process: g g > H5pp H5pp~ WEIGHTED=8 [ noborn = QCD ]
INFO: Processing color information for loop process: g g > H5pp H5pp~ [ noborn = QCD ]
INFO: Creating color matrix loop process: g g > H5pp H5pp~ WEIGHTED=8 [ noborn = QCD ]
INFO: Creating files in directory /home/zjw/software/MG5_aMC_v2_3_3/models/GM_running/ggH5H5/SubProcesses/PV0_0_1_gg_H5ppH5ppx
ALOHA: aloha creates FFV1 set of routines with options: L1
INFO: Computing diagram color coefficients
INFO: Drawing loop Feynman diagrams for Process: g g > H5pp H5pp~ WEIGHTED=8 [ noborn = QCD ]
INFO: Creating files in directory P0_gg_H5ppH5ppx
INFO: Generating Feynman diagrams for Process: g g > H5pp H5pp~ WEIGHTED=8 [ noborn = QCD ]
INFO: Finding symmetric diagrams for subprocess group gg_H5ppH5ppx
History written to /home/zjw/software/MG5_aMC_v2_3_3/models/GM_running/ggH5H5/Cards/proc_card_mg5.dat
Generated helas calls for 1 subprocesses (16 diagrams) in 0.126 s
Export UFO model to MG4 format
ALOHA: aloha creates VVV1 routines
aloha.parsers: Illegal character '$'
Command "output ggH5H5" interrupted with error:
TypeError : 'LexToken' object has no attribute '__getitem__'
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in 'MG5_debug'.
Please attach this file to your report.

This is a process in Georgi-Machacek model, which can be download at
https://feynrules.irmp.ucl.ac.be/attachment/wiki/GeorgiMachacekModel/GM_UFO_nlo.tar.gz

when I try other processes, e.g. g g > h h [QCD], p p > H5pp H5pp~ [QCD] ... that's ok.

I just want to know where the bug is come from, the model file? or the aloha.parsers of madgraph?

cheers
Javen

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1672237] [NEW] TypeError : 'LexToken' object has no attribute '__getitem__'
Download full text (18.3 KiB)

Hi,

Looks like a model problem.
You can search inside your model for the symbol “$”. It will point you where the problem is in the UFO file.

Cheers,

Olivier

> On 13 Mar 2017, at 02:45, Jianwen Zhu <email address hidden> wrote:
>
> Public bug reported:
>
> Hi, Oliver,
>
> I encounted some troubles When I using MadGraph.
>
> This is the MG5_debug file:
> #************************************************************
> #* MadGraph5_aMC@NLO *
> #* *
> #* * * *
> #* * * * * *
> #* * * * * 5 * * * * *
> #* * * * * *
> #* * * *
> #* *
> #* *
> #* VERSION 2.3.3 2015-10-25 *
> #* *
> #* The MadGraph5_aMC@NLO Development Team - Find us at *
> #* https://server06.fynu.ucl.ac.be/projects/madgraph *
> #* *
> #************************************************************
> #* *
> #* Command File for MadGraph5_aMC@NLO *
> #* *
> #* run as ./bin/mg5_aMC filename *
> #* *
> #************************************************************
> set group_subprocesses Auto
> set ignore_six_quark_processes False
> set loop_color_flows False
> set gauge unitary
> set complex_mass_scheme False
> set max_npoint_for_channel 0
> import model sm
> define p = g u c d s u~ c~ d~ s~
> define j = g u c d s u~ c~ d~ s~
> define l+ = e+ mu+
> define l- = e- mu-
> define vl = ve vm vt
> define vl~ = ve~ vm~ vt~
> import model GM
> generate g g > H5pp H5pp~ [QCD]
> output ggH5H5
> Traceback (most recent call last):
> File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/extended_cmd.py", line 908, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/extended_cmd.py", line 897, in onecmd_orig
> return func(arg, **opt)
> File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/master_interface.py", line 284, in do_output
> self.cmd.do_output(self, line, *args, **opts)
> File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/madgraph_interface.py", line 6687, in do_output
> self.finalize(nojpeg, flaglist=flaglist)
> File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/interface/madgraph_interface.py", line 6984, in finalize
> wanted_couplings)
> File "/home/zjw/software/MG5_aMC_v2_3_3/madgraph/loop/loop_exporters.py", line 332, in convert_model_to_mg4
> wanted_lorentz = wanted_lorentz, wanted_couplings = w...

Changed in mg5amcnlo:
status: New → 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.