pysipp icon indicating copy to clipboard operation
pysipp copied to clipboard

Can't use `select.epoll()` on non-linux, need #87

Open schuettc opened this issue 2 years ago • 3 comments

(sip-load-tester-py3.9) xxxxxxx/sip-load-tester  python3 sip_load_tester/index.py Traceback (most recent call last): File "/Users/xxxxxxx/Documents/GitHub/xxxxxxx/sip-load-tester/sip_load_tester/index.py", line 1, in import pysipp File "/Users/xxxxxxx/Library/Caches/pypoetry/virtualenvs/sip-load-tester-hHnEooQS-py3.9/lib/python3.9/site-packages/pysipp/init.py", line 24, in from . import launch File "/Users/xxxxxxx/Library/Caches/pypoetry/virtualenvs/sip-load-tester-hHnEooQS-py3.9/lib/python3.9/site-packages/pysipp/launch.py", line 26, in class PopenRunner(object): File "/Users/xxxxxxx/Library/Caches/pypoetry/virtualenvs/sip-load-tester-hHnEooQS-py3.9/lib/python3.9/site-packages/pysipp/launch.py", line 38, in PopenRunner poller=select.epoll, AttributeError: module 'select' has no attribute 'epoll'

pyproject.toml:

[tool.poetry]
name = "sip-load-tester"
version = "0.1.0"
description = ""
readme = "README.md"
packages = [{include = "sip_load_tester"}]

[tool.poetry.dependencies]
python = "^3.9"
pysipp = {git = "https://github.com/SIPp/pysipp.git"}


[tool.poetry.group.dev.dependencies]
pylint = "^2.16.2"
pycodestyle = "^2.10.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

index.py

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

uas = pysipp.server(srcaddr=('10.10.8.88', 5060))
uac = pysipp.client(destaddr=uas.srcaddr)
# run server async
uas(block=False)  # returns a `pysipp.launch.PopenRunner` instance by default
uac()  # run client synchronously

schuettc avatar Feb 18 '23 10:02 schuettc

@schuettc looks like a OS stdlib mis-compat: https://docs.python.org/3/library/select.html#select.epoll

Given ur masked filepaths, looks like you're not on linux. Also, in this case this is exactly the motivation to land #87.

Not sure it has anything to do with "poetry" 😉

goodboy avatar Mar 23 '23 19:03 goodboy

This was done on a Mac, not Windows.

schuettc avatar Mar 24 '23 00:03 schuettc

@schuettc lol ma bad.

in that case you could try to use the now somewhat defunct https://github.com/SIPp/pysipp/pull/17, but ideally if you can prove #87 works on OS X that would be pretty great 😎

goodboy avatar Mar 24 '23 02:03 goodboy