AttributeError: 'module' object has no attribute 'load_model' --answered

Asked by Manning on 2011-11-27

Hi,

I recently downloaded the newest stable MG5 version, 1.3.30, and it is failing to launch. I'm running OSX 1.6, python 2.7. Version 1.3.24 seems to work fine. Here is what occurs:

bash-3.2$ ./bin/mg5
************************************************************
* *
* W E L C O M E to M A D G R A P H 5 *
* *
* *
* * * *
* * * * * *
* * * * * 5 * * * * *
* * * * * *
* * * *
* *
* VERSION 1.3.30 2011-11-18 *
* *
* The MadGraph Development Team - Please visit us at *
* https://server06.fynu.ucl.ac.be/projects/madgraph *
* *
* Type 'help' for in-line help. *
* Type 'tutorial' to learn how MG5 works *
* *
************************************************************
load MG5 configuration from input/mg5_configuration.txt
Using default text editor "vi". Set another one in ./input/mg5_configuration.txt
Loading default model: sm
Traceback (most recent call last):
  File "./bin/mg5", line 140, in <module>
    cmd_interface.MadGraphCmdShell(mgme_dir = options.mgme_dir).cmdloop()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 109, in cmdloop
    self.preloop()
  File "/Users/pmanning/MadGraph5_v1_3_30/madgraph/interface/cmd_interface.py", line 3252, in preloop
    self.do_import('model sm')
  File "/Users/pmanning/MadGraph5_v1_3_30/madgraph/interface/cmd_interface.py", line 2326, in do_import
    self._curr_model = import_ufo.import_model(args[1])
  File "/Users/pmanning/MadGraph5_v1_3_30/models/import_ufo.py", line 89, in import_model
    model = import_full_model(model_path)
  File "/Users/pmanning/MadGraph5_v1_3_30/models/import_ufo.py", line 141, in import_full_model
    ufo_model = ufomodels.load_model(model_path)
AttributeError: 'module' object has no attribute 'load_model'

Has anyone else experienced this issue?

Thanks!

Peter M

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Manning
Solved:
2011-11-29
Last query:
2011-11-29
Last reply:
2011-11-28

Hi Peter,

The problem is that you overwrite the file models/__init__.py
(probably in copying in the wrong place a model, I did it a couple of times myself)

This files contains sensitive instruction.
So either you restart the installation,
or you download the following file from the trunk:
http://bazaar.launchpad.net/~madteam/madgraph5/trunk/download/head:/__init__.py-20100602214914-rxekt02lz09l8oe1-5/__init__.py

Cheers,

Olivier

Manning (petermanningjr) said : #2

Thanks!

You were right. Somehow I managed to do this twice on separate downloads.

Cheers,

Peter