expert mode of MadAnalysis5

Asked by Muhammad Farooq

I have to face a problem when i'm going to work in the expert mode. when I go in expert mode by execute the command given below:
 python2.7 ./bin/ma5 --expert
then it asked two questions i have answer the first question but at the its goes to wrong and its not succeed.
like here error:
Welcome to the expert mode of MadAnalysis
MA5: Please enter a folder name for creating an empty SampleAnalyzer job
Answer: MyAnalysis
MA5: Creating folder '/home/mfarooq/madanalysishep/madanalysis5/MyAnalysis'...
MA5: Copying required 'SampleAnalyzer' source files...
MA5: Please enter a name for your analysis
Answer: work
MA5: Writing an empty analysis...
  File "newAnalyzer.py", line 40
    print " Error: the directory called 'User/Analyzer' is not found."
                                                                            ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(" Error: the directory called 'User/Analyzer' is not found.")?
Traceback (most recent call last):
  File "./bin/ma5", line 70, in <module>
    madanalysis.core.launcher.LaunchMA5(version, date, ma5dir)
  File "/home/mfarooq/madanalysishep/madanalysis5/madanalysis/core/launcher.py", line 409, in LaunchMA5
    repeat = MainSession(mode,arglist,ma5dir,version,date)
  File "/home/mfarooq/madanalysishep/madanalysis5/madanalysis/core/launcher.py", line 287, in MainSession
    if not expert.Copy(dirname):
  File "/home/mfarooq/madanalysishep/madanalysis5/madanalysis/core/expert_mode.py", line 114, in Copy
    file = open(self.path+"/Build/SampleAnalyzer/User/Analyzer/analysisList.h")
IOError: [Errno 2] No such file or directory: '/home/mfarooq/madanalysishep/madanalysis5/MyAnalysis/Build/SampleAnalyzer/User/Analyzer/analysisList.h'

Question information

Language:
English Edit question
Status:
Answered
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Benjamin Fuks (fuks) said :
#1

Dear Muhammad,

The code runs the script newAnalyzer.py (located in tools/SampleAnalyzer), and it apparently tries to run it with python 3. A first solution may be to change the first line of the script so that python 2.7 usage is enforced. Otherwise, you may need to setup your environement variables so that "python" refgers to python 2.7 and not python 3.

Regards,

Benjamin

> On 1 Dec 2019, at 22:52 , Muhammad Farooq <email address hidden> wrote:
>
> New question #686455 on MadAnalysis 5:
> https://answers.launchpad.net/madanalysis5/+question/686455
>
> I have to face a problem when i'm going to work in the expert mode. when I go in expert mode by execute the command given below:
> python2.7 ./bin/ma5 --expert
> then it asked two questions i have answer the first question but at the its goes to wrong and its not succeed.
> like here error:
> Welcome to the expert mode of MadAnalysis
> MA5: Please enter a folder name for creating an empty SampleAnalyzer job
> Answer: MyAnalysis
> MA5: Creating folder '/home/mfarooq/madanalysishep/madanalysis5/MyAnalysis'...
> MA5: Copying required 'SampleAnalyzer' source files...
> MA5: Please enter a name for your analysis
> Answer: work
> MA5: Writing an empty analysis...
> File "newAnalyzer.py", line 40
> print " Error: the directory called 'User/Analyzer' is not found."
> ^
> SyntaxError: Missing parentheses in call to 'print'. Did you mean print(" Error: the directory called 'User/Analyzer' is not found.")?
> Traceback (most recent call last):
> File "./bin/ma5", line 70, in <module>
> madanalysis.core.launcher.LaunchMA5(version, date, ma5dir)
> File "/home/mfarooq/madanalysishep/madanalysis5/madanalysis/core/launcher.py", line 409, in LaunchMA5
> repeat = MainSession(mode,arglist,ma5dir,version,date)
> File "/home/mfarooq/madanalysishep/madanalysis5/madanalysis/core/launcher.py", line 287, in MainSession
> if not expert.Copy(dirname):
> File "/home/mfarooq/madanalysishep/madanalysis5/madanalysis/core/expert_mode.py", line 114, in Copy
> file = open(self.path+"/Build/SampleAnalyzer/User/Analyzer/analysisList.h")
> IOError: [Errno 2] No such file or directory: '/home/mfarooq/madanalysishep/madanalysis5/MyAnalysis/Build/SampleAnalyzer/User/Analyzer/analysisList.h'
>
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Can you help with this problem?

Provide an answer of your own, or ask Muhammad Farooq for more information if necessary.

To post a message you must log in.