Wangys-prog / prPred

Prediction plant resistance proteins (R proteins)
4 stars 1 forks source link

NameError: name 'feature' is not defined #5

Open chaimol opened 2 years ago

chaimol commented 2 years ago

I have installed all the require python packages and other require software. I am run python3 prPred.py -i genome.protein.fa, have an error

Traceback (most recent call last):
  File "prPred.py", line 11, in <module>
    from codes import *
ImportError: bad magic number in 'codes': b'B\r\r\n'

I follow the https://stackoverflow.com/questions/514371/whats-the-bad-magic-number-error,delete the *.pyc by run find . -name '*.pyc' -delete And then I rerun the command python3 prPred.py -i genome.protein.fa,have another error:

Traceback (most recent call last):
  File "/share/home/c/soft/prPred/prPred.py", line 65, in <module>
    main()
  File "/share/home/c/soft/prPred/prPred.py", line 54, in main
    feature.extract_feature(input,output)
NameError: name 'feature' is not defined

I am runing in linux and python 3.8.13.

Wangys-prog commented 2 years ago

Please do not delete .pyc files, and please check the format of your input file

chaimol commented 2 years ago

I have reinstall prPred.Then run python3 prPred.py -h with error as mentioned before

Traceback (most recent call last):
  File "prPred.py", line 11, in <module>
    from codes import *
ImportError: bad magic number in 'codes': b'B\r\r\n'
Wangys-prog commented 2 years ago
  1. " python 3.7 xxxx/xxxx/prPred/prPred.py -i /xxxx/xxxx/test/test.fasta -o /xxxx/xxxxx/result" Please use python3.7, the .pyc files are compiled using python3.7.
  2. "export PATH=$PATH:/xxxx/xxxx/xxxx/prPred/dist/prPred " "prPred -i /xxxx/xxxx/test/test.fasta -o result", Python Version 3.0 or above