Describe the bug
Not able to install pyan when calling ControlFlow.py.
To Reproduce
I tried to run the following code in ControlFlow.py and get the following error:
import shutil
PYAN = 'pyan3' if shutil.which('pyan3') is not None else 'pyan'
if shutil.which(PYAN) is None:
# If installed from pypi, pyan may still be missing
os.system('pip install "git+https://github.com/uds-se/pyan#egg=pyan"')
PYAN = 'pyan3' if shutil.which('pyan3') is not None else 'pyan'
assert shutil.which(PYAN) is not None
File "D:\Python\lib\site-packages\fuzzingbook\GreyboxFuzzer.py", line 647, in <module>
from .ControlFlow import generate_maze_code
File "D:\Python\lib\site-packages\fuzzingbook\ControlFlow.py", line 861, in <module>
assert shutil.which(PYAN) is not None
AssertionError
Expected behavior
The code should install pyan and move on
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: windows 11
- Python version 3.10
Additional context
I tested my installation and if pyan is runnable.
>where.exe pyan
D:\Python\Scripts\pyan
>pyan test.py --uses --defines --colored --grouped --annotated --dot > test.dot
# this pop up a window letting you select which application you would like to open this file with
This is because the pyan installed from https://github.com/uds-se/pyan#egg=pyan will create a file named pyan in Python\Script\ without a file name extension .exe. However, shutil.which() will only search for executables with file name extensions like .exe . The pyan installation code from ControlFlow.py is not working for my machine (windows 11).
Qucik Solution
Uninstall pyan and use pip install pyan3 instead. Will get the pyan3.exe file in the Python/Script folder.
Describe the bug
Not able to install
pyanwhen callingControlFlow.py.To Reproduce
I tried to run the following code in
ControlFlow.pyand get the following error:Expected behavior
The code should install
pyanand move onScreenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
I tested my installation and if
pyanis runnable.This is because the pyan installed from
https://github.com/uds-se/pyan#egg=pyanwill create a file namedpyaninPython\Script\without a file name extension.exe. However,shutil.which()will only search for executables with file name extensions like.exe. Thepyaninstallation code fromControlFlow.pyis not working for my machine (windows 11).Qucik Solution
Uninstall
pyanand usepip install pyan3instead. Will get thepyan3.exefile in thePython/Scriptfolder.