Closed cedrickring closed 3 years ago
hey @cedrickring, thanks for reaching out.
I updated my Mac to Big Sur and can get service bus v7 work with python 3.8. But my Mac is an old one (2019 with the intel chip), are you using the latest Mac with the M1 chip?
I tried creating a fresh environment with no other dependencies and did a pip install --no-cache-dir azure-servicebus
, so pip downloads all dependencies.
Unfortunately the same error still occurs. I'm using a 2018 MBP with the i9 chip.
EDIT: Some other system information that might be helpful:
python
prints:
Python 3.8.6 (default, Nov 20 2020, 23:57:10)
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
pip --version
prints pip 20.3 from $PROJECT_PATH/venv/lib/python3.8/site-packages/pip (python 3.8)
azure-servicebus
(pip freeze)
pip install --no-cache-dir azure-servicebus
thanks for the extra platform info @cedrickring, I'll try to align the settings on my mac with yours and try to reproduce
I can verify that this is happening on my machine as well. Here are my system settings
pip 20.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
Python 3.9.0
Error:
2020-12-01 22:43:19.936 Python[14029:1638834] -[__NSCFConstantString objectForKey:]: unrecognized selector sent to instance 0x7fff8021aaf0
2020-12-01 22:43:19.940 Python[14029:1638834] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString objectForKey:]: unrecognized selector sent to instance 0x7fff8021aaf0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff204ba6af __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff201f23c9 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2053cc85 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff2042206d ___forwarding___ + 1467
4 CoreFoundation 0x00007fff20421a28 _CF_forwarding_prep_0 + 120
5 CFNetwork 0x00007fff247131ff CFURLRequestSetAllowsCellularAccess + 502
6 CFNetwork 0x00007fff24705195 _CFURLResponseGetSSLCertificateContext + 7757
7 CoreFoundation 0x00007fff20457ef0 CFReadStreamSetProperty + 87
8 c_uamqp.cpython-39-darwin.so 0x000000010dc4a1f9 tlsio_appleios_dowork + 313
9 c_uamqp.cpython-39-darwin.so 0x000000010db83153 __pyx_f_5uamqp_7c_uamqp_10Connection_do_work + 963
10 c_uamqp.cpython-39-darwin.so 0x000000010dbd0f29 __pyx_pf_5uamqp_7c_uamqp_10Connection_16do_work + 73
11 c_uamqp.cpython-39-darwin.so 0x000000010dbd0ec4 __pyx_pw_5uamqp_7c_uamqp_10Connection_17do_work + 36
12 Python 0x000000010c4e042e cfunction_vectorcall_NOARGS + 277
13 Python 0x000000010c5582c0 call_function + 960
14 Python 0x000000010c555208 _PyEval_EvalFrameDefault + 27424
15 Python 0x000000010c4b06dc function_code_fastcall + 97
16 Python 0x000000010c558093 call_function + 403
17 Python 0x000000010c555208 _PyEval_EvalFrameDefault + 27424
18 Python 0x000000010c4b06dc function_code_fastcall + 97
19 Python 0x000000010c558093 call_function + 403
20 Python 0x000000010c555208 _PyEval_EvalFrameDefault + 27424
21 Python 0x000000010c4b06dc function_code_fastcall + 97
22 Python 0x000000010c558093 call_function + 403
23 Python 0x000000010c555208 _PyEval_EvalFrameDefault + 27424
24 Python 0x000000010c4b06dc function_code_fastcall + 97
25 Python 0x000000010c558093 call_function + 403
26 Python 0x000000010c555208 _PyEval_EvalFrameDefault + 27424
27 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
28 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
29 Python 0x000000010c4b233f method_vectorcall + 164
30 Python 0x000000010c4b03b3 PyVectorcall_Call + 146
31 Python 0x000000010c555554 _PyEval_EvalFrameDefault + 28268
32 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
33 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
34 Python 0x000000010c4b233f method_vectorcall + 164
35 Python 0x000000010c558093 call_function + 403
36 Python 0x000000010c55538e _PyEval_EvalFrameDefault + 27814
37 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
38 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
39 Python 0x000000010c4b233f method_vectorcall + 164
40 Python 0x000000010c558093 call_function + 403
41 Python 0x000000010c55538e _PyEval_EvalFrameDefault + 27814
42 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
43 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
44 Python 0x000000010c558093 call_function + 403
45 Python 0x000000010c555208 _PyEval_EvalFrameDefault + 27424
46 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
47 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
48 Python 0x000000010c4b233f method_vectorcall + 164
49 Python 0x000000010c558093 call_function + 403
50 Python 0x000000010c55538e _PyEval_EvalFrameDefault + 27814
51 Python 0x000000010c4b06dc function_code_fastcall + 97
52 Python 0x000000010c555554 _PyEval_EvalFrameDefault + 28268
53 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
54 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
55 Python 0x000000010c555554 _PyEval_EvalFrameDefault + 28268
56 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
57 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
58 Python 0x000000010c4b2442 method_vectorcall + 423
59 Python 0x000000010c555554 _PyEval_EvalFrameDefault + 28268
60 Python 0x000000010c4b06dc function_code_fastcall + 97
61 Python 0x000000010c558093 call_function + 403
62 Python 0x000000010c555208 _PyEval_EvalFrameDefault + 27424
63 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
64 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
65 Python 0x000000010c558093 call_function + 403
66 Python 0x000000010c555208 _PyEval_EvalFrameDefault + 27424
67 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
68 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
69 Python 0x000000010c558093 call_function + 403
70 Python 0x000000010c555208 _PyEval_EvalFrameDefault + 27424
71 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
72 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
73 Python 0x000000010c4b233f method_vectorcall + 164
74 Python 0x000000010c4b03b3 PyVectorcall_Call + 146
75 Python 0x000000010c555554 _PyEval_EvalFrameDefault + 28268
76 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
77 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
78 Python 0x000000010c4afebc _PyObject_FastCallDictTstate + 149
79 Python 0x000000010c4b0925 _PyObject_Call_Prepend + 139
80 Python 0x000000010c4f8373 slot_tp_call + 87
81 Python 0x000000010c4b0037 _PyObject_MakeTpCall + 266
82 Python 0x000000010c5580c7 call_function + 455
83 Python 0x000000010c55538e _PyEval_EvalFrameDefault + 27814
84 Python 0x000000010c4b06dc function_code_fastcall + 97
85 Python 0x000000010c558093 call_function + 403
86 Python 0x000000010c5552d0 _PyEval_EvalFrameDefault + 27624
87 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
88 Python 0x000000010c54e60d PyEval_EvalCode + 79
89 Python 0x000000010c54b947 builtin_exec + 581
90 Python 0x000000010c4e0233 cfunction_vectorcall_FASTCALL + 203
91 Python 0x000000010c558093 call_function + 403
92 Python 0x000000010c5552d0 _PyEval_EvalFrameDefault + 27624
93 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
94 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
95 Python 0x000000010c558093 call_function + 403
96 Python 0x000000010c5552d0 _PyEval_EvalFrameDefault + 27624
97 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
98 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
99 Python 0x000000010c558093 call_function + 403
100 Python 0x000000010c55538e _PyEval_EvalFrameDefault + 27814
101 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
102 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
103 Python 0x000000010c558093 call_function + 403
104 Python 0x000000010c55538e _PyEval_EvalFrameDefault + 27814
105 Python 0x000000010c4b06dc function_code_fastcall + 97
106 Python 0x000000010c558093 call_function + 403
107 Python 0x000000010c5552d0 _PyEval_EvalFrameDefault + 27624
108 Python 0x000000010c4b06dc function_code_fastcall + 97
109 Python 0x000000010c558093 call_function + 403
110 Python 0x000000010c555224 _PyEval_EvalFrameDefault + 27452
111 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
112 Python 0x000000010c54e60d PyEval_EvalCode + 79
113 Python 0x000000010c54b947 builtin_exec + 581
114 Python 0x000000010c4e0233 cfunction_vectorcall_FASTCALL + 203
115 Python 0x000000010c558093 call_function + 403
116 Python 0x000000010c5552d0 _PyEval_EvalFrameDefault + 27624
117 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
118 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
119 Python 0x000000010c558093 call_function + 403
120 Python 0x000000010c5552d0 _PyEval_EvalFrameDefault + 27624
121 Python 0x000000010c558bdb _PyEval_EvalCode + 1998
122 Python 0x000000010c4b066c _PyFunction_Vectorcall + 248
123 Python 0x000000010c59f398 pymain_run_module + 353
124 Python 0x000000010c59ebbd Py_RunMain + 1199
125 Python 0x000000010c59f176 pymain_main + 306
126 Python 0x000000010c59f1c4 Py_BytesMain + 42
127 libdyld.dylib 0x00007fff20363631 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
@yunhaoling I have the same issue on a 2019 MBP with the i9 chip (so a bit closer to your setup)
may I ask how you guys install your python? -- is it built from source code/via the installer/via conda or something else
I checked my python which is installed by the installer available on the official website and when I type pthon:
python 3.8.6/python3.9.0
[Clang 6.0 (clang-600.0.57)] on darwin
I'm wondering if it's the latest clang v12 causing the issue. meanwhile I'll try building python using the source code to see if I could reproduce.
confirming the issue by building python from source code on BigSur with clang 12.0.0, that's interesting. I'll dig deeper to see how it is broken.
meanwhile, the official distribution for macos seems to work fine https://www.python.org/downloads/release/python-390/ -- could you also verify it works on your machine?
--------- latest update ---------
found a relevant issue and the fix, will try it out
https://github.com/Azure/azure-iot-sdk-c/issues/1624 https://github.com/ayershinn/azure-c-shared-utility/pull/1/files
@yunhaoling I can confirm, azure-servicebus seems to work when installing Python from this url https://www.python.org/downloads/release/python-390/. Though I prefer installing Python via homebrew which seems to be compiled with Clang 12.0.0...
hey @cedrickring , FYI: my fix PR gets merged into the underlying C repo, we'll do a uamqp release after we address some other uamqp issues.
Confirming the same issue here on a 2019 16" MacBook Pro i7 Big Sur 11.0.1
Python 3.8.6 installed via homebrew. azure-servicebus 0.50.2 and 7.0.0
2020-12-13 21:43:57.225 Python[5770:52548] -[NSCFConstantString objectForKey:]: unrecognized selector sent to instance 0x7fff80211af0 2020-12-13 21:43:57.226 Python[5770:52548] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString objectForKey:]: unrecognized selector sent to instance 0x7fff80211af0' *** First throw call stack: ( 0 CoreFoundation 0x00007fff204b16af exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007fff201e93c9 objc_exception_throw + 48 2 CoreFoundation 0x00007fff20533c85 -[NSObject(NSObject) retain_OA] + 0 3 CoreFoundation 0x00007fff2041906d forwarding + 1467 4 CoreFoundation 0x00007fff20418a28 _CF_forwarding_prep_0 + 120 5 CFNetwork 0x00007fff2470a1ff CFURLRequestSetAllowsCellularAccess + 502 6 CFNetwork 0x00007fff246fc195 _CFURLResponseGetSSLCertificateContext + 7757 7 CoreFoundation 0x00007fff2044eef0 CFReadStreamSetProperty + 87 8 c_uamqp.cpython-38-darwin.so 0x0000000101ff41b9 tlsio_appleios_dowork + 313 9 c_uamqp.cpython-38-darwin.so 0x0000000101f28ffe pyx_f_5uamqp_7c_uamqp_10Connection_do_work + 974 10 c_uamqp.cpython-38-darwin.so 0x0000000101f794c9 pyx_pf_5uamqp_7c_uamqp_10Connection_16do_work + 73 11 c_uamqp.cpython-38-darwin.so 0x0000000101f79464 __pyx_pw_5uamqp_7c_uamqp_10Connection_17do_work + 36 12 Python 0x000000010191a9c8 method_vectorcall_NOARGS + 242 13 Python 0x00000001019b3b6d call_function + 346 14 Python 0x00000001019b072b _PyEval_EvalFrameDefault + 29833 15 Python 0x00000001019137b2 function_code_fastcall + 106 16 Python 0x00000001019b3b6d call_function + 346 17 Python 0x00000001019b072b _PyEval_EvalFrameDefault + 29833 18 Python 0x00000001019137b2 function_code_fastcall + 106 19 Python 0x00000001019b3b6d call_function + 346 20 Python 0x00000001019b072b _PyEval_EvalFrameDefault + 29833 21 Python 0x00000001019137b2 function_code_fastcall + 106 22 Python 0x00000001019b3b6d call_function + 346 23 Python 0x00000001019b072b _PyEval_EvalFrameDefault + 29833 24 Python 0x00000001019137b2 function_code_fastcall + 106 25 Python 0x00000001019b3b6d call_function + 346 26 Python 0x00000001019b072b _PyEval_EvalFrameDefault + 29833 27 Python 0x00000001019137b2 function_code_fastcall + 106 28 Python 0x00000001019158e0 method_vectorcall + 256 29 Python 0x00000001019b01b0 _PyEval_EvalFrameDefault + 28430 30 Python 0x00000001019b4687 _PyEval_EvalCodeWithName + 1947 31 Python 0x0000000101913917 _PyFunction_Vectorcall + 227 32 Python 0x00000001019b3b6d call_function + 346 33 Python 0x00000001019b072b _PyEval_EvalFrameDefault + 29833 34 Python 0x00000001019b4687 _PyEval_EvalCodeWithName + 1947 35 Python 0x0000000101913917 _PyFunction_Vectorcall + 227 36 Python 0x00000001019b3b6d call_function + 346 37 Python 0x00000001019b0804 _PyEval_EvalFrameDefault + 30050 38 Python 0x00000001019b4687 _PyEval_EvalCodeWithName + 1947 39 Python 0x00000001019a91ff PyEval_EvalCode + 51 40 Python 0x00000001019e248d run_eval_code_obj + 102 41 Python 0x00000001019e18dc run_mod + 82 42 Python 0x00000001019e07a8 PyRun_FileExFlags + 160 43 Python 0x00000001019dfe95 PyRun_SimpleFileExFlags + 271 44 Python 0x00000001019f7828 Py_RunMain + 1870 45 Python 0x00000001019f7b6f pymain_main + 306 46 Python 0x00000001019f7bbd Py_BytesMain + 42 47 libdyld.dylib 0x00007fff2035a631 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException
Any news on when the release will be out? Thanks!
@kriwal-arkivverket according to this PR the fix in the underlying lib (uamqp
) should be released at some point today. Afterwards we should theoretically be able to manually upgrade it with pip (because azure-servicebus
specifies uamqp>=1.2.12
, which should be compatible with the to-be-released 1.2.13
).
patiently waiting on this one....
sorry for keeping you waiting for a long time.
We have released uamqp v1.2.13 today which includes the fix for this issue.
Please upgrade the uamqp in your env to the latest version (e.g. via pip install uamqp --upgrade
).
Let me know if you're still getting trouble with the latest version.
Looks like it's working! 🎉
Describe the bug Opening a connection crashes the process with the following error:
To Reproduce Steps to reproduce the behavior:
connection_string = ''
queue = ''
client: ServiceBusClient = ServiceBusClient.from_connection_string(connection_string) client.get_queue_receiver(queue_name=queue).peek_messages(max_message_count=10)