You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Describe the bug
Not able to install
pyan
when callingControlFlow.py
.To Reproduce
I tried to run the following code in
ControlFlow.py
and get the following error:Expected behavior
The code should install
pyan
and 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
pyan
is runnable.This is because the pyan installed from
https://github.com/uds-se/pyan#egg=pyan
will create a file namedpyan
inPython\Script\
without a file name extension.exe
. However,shutil.which()
will only search for executables with file name extensions like.exe
. Thepyan
installation code fromControlFlow.py
is not working for my machine (windows 11).Qucik Solution
Uninstall
pyan
and usepip install pyan3
instead. Will get thepyan3.exe
file in thePython/Script
folder.The text was updated successfully, but these errors were encountered: