Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError raised when sipp binanry not found #77

Open
q1980361267 opened this issue May 24, 2022 · 5 comments
Open

FileNotFoundError raised when sipp binanry not found #77

q1980361267 opened this issue May 24, 2022 · 5 comments
Labels

Comments

@q1980361267
Copy link

q1980361267 commented May 24, 2022

raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '-sn': '-sn'


UPDATE (by @goodboy)

The real issue here is not loading a more explicit error when the sipp binary can't be found in the environment.

49b50a9 contains a fix for this but we still need a test to match.

@goodboy
Copy link
Member

goodboy commented May 24, 2022

provide a script to reproduce or we can't do much.

@goodboy goodboy changed the title when i run,there comes some questions FileNotFoundError due to -sn flag? May 24, 2022
@q1980361267
Copy link
Author

just use the demo as the script below:

import pysipp
pysipp.client(destaddr=('10.10.8.88', 5060))()

@pablodz
Copy link

pablodz commented May 26, 2022

@q1980361267 you need to install sipp first,

git clone https://github.com/SIPp/sipp.git
cd sipp
cmake .
make
export PATH=$PATH:/home/username/whereyoursipbinaryisinstalled
# Then
python3 example.py

Remember that this way of export just exists in one terminal, if you want to use always, add to ~/.bashrc

@goodboy
Copy link
Member

goodboy commented Dec 19, 2022

@pablodz ahh thanks for that follow up. I just saw this same issue working the rebase of #87..

I just added code to raise a more explicit RuntimeError when the sipp binary can't be found in 49b50a9.

Probably we should write a test that verifies this more explicit raise so that user's don't get confused in the future.

@goodboy goodboy changed the title FileNotFoundError due to -sn flag? FileNotFoundError raised when sipp binanry not found Dec 19, 2022
@goodboy goodboy added the bug label Dec 19, 2022
@pablodz
Copy link

pablodz commented Dec 19, 2022

@pablodz ahh thanks for that follow up. I just saw this same issue working the rebase of #87..

I just added code to raise a more explicit RuntimeError when the sipp binary can't be found in 49b50a9.

Probably we should write a test that verifies this more explicit raise so that user's don't get confused in the future.

@goodboy
I was trying https://chat.openai.com/ to write test functions, works very well, maybe using chatGPT to decrease tech debt would be nice, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants