-
Notifications
You must be signed in to change notification settings - Fork 3
OS Error from client #1
Comments
Thanks for raising this, we will work to repro and provide guidance. |
I'm getting a similar issue at completion of a program on Ubuntu 21.04 w/Python 3.10.1:
|
@amorphic I can't seem to replicate that under ubuntu 21.10 /w python 3.10.1. Can you give me more detail on your setup.
|
@mattkantor Is your macbook powered by m1 or intel? Also what is the version of macOS you tried this on? Also do you use pyenv? Any other info would be also helpful. |
@dano-klaviyo This happens on my M1 (under rosetta) but also under ubuntu in Gitlab CI. I read something about swagger_client having issues with the del method which calls pool.close() - I tried to resolved using 3.9 but no luck. I use virtualenv. |
|
The approach used by swagger-codegen for cleaning up pools is apparently unsupported by CPython, but the openapi-generator fork seems to have accepted a fix. |
Im attempting to use the new Python SDK (very nice design BTW). I'm making only the following call in pytest
self.client = Client(api_key=credentials['api_key'], max_delay=1, max_retries=1)
and when the tests finish, I see this :
Exception ignored in: <function ApiClient.__del__ at 0x13a0271f0> Traceback (most recent call last): File "/Users/matthewkantor/dev/bifrost/venv/lib/python3.8/site-packages/swagger_client/api_client.py", line 78, in __del__ self.pool.close() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/pool.py", line 649, in close self._change_notifier.put(None) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/queues.py", line 368, in put self._writer.send_bytes(obj) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/connection.py", line 200, in send_bytes self._send_bytes(m[offset:offset + size]) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/connection.py", line 411, in _send_bytes self._send(header + buf) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/connection.py", line 368, in _send n = write(self._handle, buf) OSError: [Errno 9] Bad file descriptor
Im not even making any API calls, I'm just creating the client.
NOTE: This is happening on MacOS Python 3.8 venv. Pytest running on 3.8 in gitlab ci does not yield these results.
The text was updated successfully, but these errors were encountered: