BiAn icon indicating copy to clipboard operation
BiAn copied to clipboard

No module named 'fraction' in BiAn src.

Open AlirezaEthDev opened this issue 2 years ago • 1 comments

I've cloned BiAn correctly by:

git clone https://github.com/xf97/BiAn

After that, I change the directory to the BiAn src and there I run it by:

python main.py <contractName>.sol <contractName>.ast But, This error occurred and the process stopped:

Traceback (most recent call last):
  File "...\BiAn\src\main.py", line 5, in <module>
    from dataflowObfuscation import dataflowObfuscation
  File "...\BiAn\src\dataflowObfuscation.py", line 15, in <module>
    from literal2Exp import literal2Exp
  File "...\BiAn\src\literal2Exp.py", line 5, in <module>
    from generateExp import generateExp
  File "...\BiAn\src\generateExp.py", line 7, in <module>
    from postProcessing import postProcessing
  File "...\BiAn\src\postProcessing.py", line 4, in <module>
    from fraction import Fraction
ModuleNotFoundError: No module named 'fraction'

It seems there is no module named fraction in the src. I checked the online file on BiAn's GitHub and see that doesn't exist there too. So, because of that, BiAn can't do its task. What is the solution? How can I find the module?

AlirezaEthDev avatar Nov 08 '22 06:11 AlirezaEthDev

@AlirezaEthDev I solved it by installing Fraction package: pip3 install Fraction python3 main.py <contractName>.sol <contractName>.ast

z0rats avatar Jun 05 '23 17:06 z0rats