NameError: name 'init' is not defined

1,103 views
Skip to first unread message

Hila Korach - Rechtman

unread,
Nov 21, 2017, 6:28:28 AM11/21/17
to LEfSe-users
Hi LEfSe users!

since LEfSe sever is making problems recently, i tried to use the VM and the run_lefse.py command. 

i started with:
format_input.py ko_L3.txt ko_L3.lefse

and than:
run_lefse.py ko_L3.lefse ko_L3.lefse.out

which gave me this error:

Traceback (most recent call last):
  File "//lefse/run_lefse.py", line 56, in <module>
    init()
NameError: name 'init' is not defined


i will appreciate any insights on how to fix it...

cheers, 
Hila

Hila Korach - Rechtman

unread,
Nov 22, 2017, 3:39:17 AM11/22/17
to LEfSe-users
can anyone please help?
thanks so much!

בתאריך יום שלישי, 21 בנובמבר 2017 בשעה 13:28:28 UTC+2, מאת Hila Korach - Rechtman:

jfg

unread,
Nov 28, 2017, 7:54:34 AM11/28/17
to LEfSe-users
Heya Hila, 

   I spy picrust data! ;) If you haven't fixed this, I think this is because you're not telling LEfSe to use python2.7 (which it needs, as it won't run on python3+). 

   If this is the case, theres an easy fix: try putting "python2.7" at the beginning of each call:

python2.7 format_input.py ko_L3.txt ko_L3.lefse

python2.7 run_lefse.py ko_L3.lefse ko_L3.lefse.out

and so on!
all the best
jfg

Hila Korach - Rechtman

unread,
Nov 29, 2017, 4:58:35 AM11/29/17
to LEfSe-users
thanks for your answer!

however, when i added the python2.7 on the first command (format_input.py) it got this error:

python2.7: can't open file 'format_input.py': [Errno 2] No such file or directory

when i delete the "python2.7", the format_input.py worked ok, but got the same error for the second command (run_lefse.py):

python2.7: can't open file 'run_lefse.py': [Errno 2] No such file or directory

i did it with and without adding the "python2.7" addition (for the second command).

your help is very much appreciated! 
Hila

בתאריך יום שלישי, 28 בנובמבר 2017 בשעה 14:54:34 UTC+2, מאת jfg:

Leah Reshef

unread,
Nov 30, 2017, 5:58:34 AM11/30/17
to LEfSe-users
Which VM are you using ? If its docker than you dont need to specify the python 2.7. Sounds to me like something in your input data is off; download teh lefse example input file , is that running OK? If so you can attcah your input file here and we'll see if we can spot the problem

brett...@gmail.com

unread,
Jan 5, 2018, 3:39:53 PM1/5/18
to LEfSe-users
Hello,

I am having a similar problem using Docker. Why I try to use the command "format_input.py" I get the response "IOError: [Errno 2] No such file or directory: "

When I tried the example input file, I got the same error. 

Any ideas how to fix this?

Thanks,
Brett

brett...@gmail.com

unread,
Jan 5, 2018, 3:42:29 PM1/5/18
to LEfSe-users
Also, I'm using Mac with OS X El Capitan 10.11.6, if that helps.

Brett

Leah Reshef

unread,
Jan 9, 2018, 2:35:41 AM1/9/18
to LEfSe-users
Hi Bret, can you see your input file if you run 'ls' ? Could be the directory is not mounting properly.
Reply all
Reply to author
Forward
0 new messages