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
When using the requests library (directly or via pynetbox) with pyATS on macOS with Apple Silicon, the process crashes with a segmentation fault during fork pre-exec. The same code works perfectly when run in a Linux environment (Docker).
Environment
OS: macOS Sonoma 14.4.1 and 14.7.1 (tested on both M1 and M2 architectures)
Python: 3.11, 3.12.5 and 3.12.7
pyATS: 24.7, 24.9, and 24.10 (issue present in all versions)
requests: 2.31.0 and 2.32.3 (issue present in both versions)
Architecture: Apple Silicon (M1 and M2)
HTTP or HTTPS API calls
Steps to Reproduce
Create a simple test using requests within pyATS:
frompyatsimportaetestimportloggingimportrequestslogger=logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
classTestRequests(aetest.Testcase):
@aetest.setupdefsetup(self):
self.url="http://jsonplaceholder.typicode.com/posts/1"@aetest.testdeftest_simple_request(self):
response=requests.get(self.url)
logger.info(f"Response status code: {response.status_code}")
Although documentation says that python 3.10.x is the latest supported for 24.10 this https://developer.cisco.com/docs/pyats/24-2/ says that support for 3.12.x has been added in 24.2.
Hello geortich,
We have found the workaround, that is to disable network proxy lookups by defining the environment variable 'no_proxy' with value '*', for example os.environ ['no_proxy'] = '*'. For more info please check this attached case python/cpython#74570. Kindly let us know if it helps meanwhile we will also check on how we can get it done by default using pyats.
Thanks.
Hi @sowmyadn010501 ,
Thank you very much for the workaround. This approach works with python 3.11.5 (I haven't tested other versions in the 3.11 branch) but not with 3.12.5 or 3.12.7.
I hope this gets resolved natively in a future pyATS release.
Description
When using the requests library (directly or via pynetbox) with pyATS on macOS with Apple Silicon, the process crashes with a segmentation fault during fork pre-exec. The same code works perfectly when run in a Linux environment (Docker).
Environment
Steps to Reproduce
Error output
Python crashes with a cryptic error, Stopping Context.
However, mac OS produces a crash report with the following details
The text was updated successfully, but these errors were encountered: