PreForM icon indicating copy to clipboard operation
PreForM copied to clipboard

Python runtime error: No module named PreForM

Open zhouguidi opened this issue 8 years ago • 8 comments

Hi,

After manually fixing issue #4, when trying to compile something using FoBiS.py build -pfm, the following error occurs:

Traceback (most recent call last): File "/home/guidi/.local/bin/PreForM.py", line 7, in from PreForM.PreForM import main ImportError: No module named PreForM

Please fix this. Thanks! Guidi

zhouguidi avatar Sep 01 '16 13:09 zhouguidi

@szaghi can not use PreForM.py as name in "entry_points => console_scripts" because will import the console_scripts it self in "local/bin" not import from "/.local/lib/python2.7/site-packages/"

@zhouguidi you can using

pip install PreForM.py==1.1.2  

and set -preprocessor = PreForM in FoBiS.py

jubilee2 avatar Sep 14 '20 03:09 jubilee2

@jubilee2 I totally miss this very old issue, my bad. BTW PreForM is almost dead, I doubt that someone is using it. I do not know if it makes sense to delete this repository.

szaghi avatar Sep 15 '20 09:09 szaghi

@szaghi it is make no sense to me. if you want to delete. just fix it

Using python as preprocessing still cool ideal

jubilee2 avatar Sep 15 '20 09:09 jubilee2

@jubilee2

Ok, if there is interest in PreForM I'll try to keep it living. I do not understand the necessary fix anyhow: I think that PreForM is not working now, it being not ready for python 3.x, maybe I have to try to port it from 2.7 to 3.x right?

szaghi avatar Sep 15 '20 09:09 szaghi

this issue is if you run PreForM in command line without copy PreForM.py to where the folder you want to execute. it will execute the ~/.local/bin/PreForM.py file.

the '~/.local/bin/PreForM.py ' looks like

#!/usr/bin/env python
from PreForM.PreForM import main
if __name__ == '__main__' :
  main()

the from PreForM.PreForM import main will search current folder first. it is will found '~/.local/bin/PreForM.py ' and try to import it self then get error 'ImportError: No module named PreForM'

jubilee2 avatar Sep 15 '20 14:09 jubilee2

@szaghi if you want i can try to write unit test to confirm every line can run under python3 it is also new to me write python unit test ^^

jubilee2 avatar Sep 16 '20 03:09 jubilee2

@jubilee2

Thank you very much, any help is really appreciated. I am sorry for my delay, but the past weeks were very busy.

szaghi avatar Oct 07 '20 18:10 szaghi

@szaghi no problem

jubilee2 avatar Oct 07 '20 19:10 jubilee2