[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [MoM] lefse migration to python 3

Hi Shayan,

On Tue, Sep 10, 2019 at 08:01:00PM +0100, Shayan Doust wrote:
> Running the latest clone, I get on all binaries an identical error:
> $ run_lefse
>   File "/usr/bin/run_lefse", line 25
>     parser.add_argument('-r',dest="rank_tec", metavar='str',
> choices=['lda','svm'], type=str, default='lda',
>                                    ^
> TabError: inconsistent use of tabs and spaces in indentation
> Looking at how the tab entries / spaces are, it seems to be completely
> mixed in almost all the python files. It looks like I would have to run
> autopep8 to correct this behaviour, but that would result in the bigger
> patch size replacing all the *.py but this is unavoidable.

So just do it.  If the code is of that quality we definitely need
a patch that is longer than usual.

> So it is suggested to preserve this from getting changed (from lefse
> import *).

I'm interpreting


that the '.' introduced by 2to3 should be removed.
> Running "python3 run_lefse.py" within the working directory, I get the
> help output for run_lefse, so this is working. Installing lefse deb on
> my system and running run_lefse in terminal:
> $ run_lefse
> Traceback (most recent call last):
>   File "/usr/bin/run_lefse", line 7, in <module>
>     from lefse import *
> ModuleNotFoundError: No module named 'lefse'
> Is this normal expected behaviour

No.  That's not normal.

> before I push? Why would run_lefse.py
> and run_lefse differ when executed differently, assuming they are identical.

Something is wrong with PYTHONPATH.  I'd suggest you push and I'll have
a look.
Kind regards



Reply to: