Problem while opening MadGraph

Asked by Camila Pereira Ramos

Hello all,

When I type the command "$ ./mg5_aMC" the following error comes out:

Traceback (most recent call last):
  File "./bin/mg5_aMC", line 212, in <module>
    cmd_line.cmdloop()
  File "/home/camila/Desktop/MG5_aMC_v3_3_1/madgraph/interface/extended_cmd.py", line 942, in cmdloop
    self.preloop()
  File "/home/camila/Desktop/MG5_aMC_v3_3_1/madgraph/interface/madgraph_interface.py", line 3036, in preloop
    CmdExtended.preloop(self)
  File "/home/camila/Desktop/MG5_aMC_v3_3_1/madgraph/interface/extended_cmd.py", line 937, in preloop
    readline.set_completion_display_matches_hook(self.print_suggestions)
AttributeError: module 'readline' has no attribute 'set_completion_display_matches_hook'

What should I do to solve this?

Thank you.

Question information

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

Never seen that.
Which version of readline do you have install?

Cheers,

Olivier

> On 19 Jan 2022, at 00:50, Camila Pereira Ramos <email address hidden> wrote:
>
> New question #700289 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/700289
>
> Hello all,
>
> When I type the command "$ ./mg5_aMC" the following error comes out:
>
> Traceback (most recent call last):
> File "./bin/mg5_aMC", line 212, in <module>
> cmd_line.cmdloop()
> File "/home/camila/Desktop/MG5_aMC_v3_3_1/madgraph/interface/extended_cmd.py", line 942, in cmdloop
> self.preloop()
> File "/home/camila/Desktop/MG5_aMC_v3_3_1/madgraph/interface/madgraph_interface.py", line 3036, in preloop
> CmdExtended.preloop(self)
> File "/home/camila/Desktop/MG5_aMC_v3_3_1/madgraph/interface/extended_cmd.py", line 937, in preloop
> readline.set_completion_display_matches_hook(self.print_suggestions)
> AttributeError: module 'readline' has no attribute 'set_completion_display_matches_hook'
>
> What should I do to solve this?
>
> Thank you.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

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

According to the official documentation (if your readline module is the official one):
https://docs.python.org/3.11/library/readline.html

Even with the (not yet released) python3.11 this should be supported.

Now I know that 100 years from now, some Mac under leopard/snowleopard were using some non official python version where readline was not the standard one. But we (when possible) were able to detect that to handle most of the problematic case.
(but apple was not making that easy).

a work around is to comment the line
 File "/home/camila/Desktop/MG5_aMC_v3_3_1/madgraph/interface/extended_cmd.py", line 937,
This will forbid some interface feature (in this case the auto-complemention will not work as it is designed) but should allow you to work and have physics results (but the user experience will be degraded)

Can you help with this problem?

Provide an answer of your own, or ask Camila Pereira Ramos for more information if necessary.

To post a message you must log in.