question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poetry is throwing `NSException`on an M1 machine.

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Apple M1 Pro, 12.2.1 (21D62),
  • Poetry version: 1.1.3
  • Link of a Gist with the contents of your pyproject.toml file: Link

Issue

Running poetry install is throwing NSException

2022-05-11 15:10:17.526 python3.8[8776:35525405] -[__NSCFType bytes]: unrecognized selector sent to instance 0x128892cf0
2022-05-11 15:10:17.530 python3.8[8776:35525405] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType bytes]: unrecognized selector sent to instance 0x128892cf0'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000018516c1cc __exceptionPreprocess + 240
	1   libobjc.A.dylib                     0x0000000184ebd7b8 objc_exception_throw + 60
	2   CoreFoundation                      0x00000001851ff1a0 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00000001850cc360 ___forwarding___ + 1728
	4   CoreFoundation                      0x00000001850cbbe0 _CF_forwarding_prep_0 + 96
	5   libffi.dylib                        0x00000001930ac050 ffi_call_SYSV + 80
	6   libffi.dylib                        0x00000001930b49e4 ffi_call_int + 948
	7   _ctypes.cpython-38-darwin.so        0x00000001124cc1fc _ctypes_callproc + 1208
	8   _ctypes.cpython-38-darwin.so        0x00000001124c5608 PyCFuncPtr_call + 1176
	9   python3.8                           0x000000010438d5d4 _PyObject_MakeTpCall + 372
	10  python3.8                           0x000000010445889c call_function + 448
	11  python3.8                           0x0000000104456050 _PyEval_EvalFrameDefault + 23812
	12  python3.8                           0x000000010438df94 function_code_fastcall + 120
	13  python3.8                           0x00000001044587fc call_function + 288
	14  python3.8                           0x0000000104456050 _PyEval_EvalFrameDefault + 23812
	15  python3.8                           0x0000000104459830 _PyEval_EvalCodeWithName + 3220
	16  python3.8                           0x000000010438e114 _PyFunction_Vectorcall + 248
	17  python3.8                           0x00000001044587fc call_function + 288
	18  python3.8                           0x0000000104455fdc _PyEval_EvalFrameDefault + 23696
	19  python3.8                           0x000000010438df94 function_code_fastcall + 120
	20  python3.8                           0x00000001044587fc call_function + 288
	21  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	22  python3.8                           0x000000010438df94 function_code_fastcall + 120
	23  python3.8                           0x00000001044587fc call_function + 288
	24  python3.8                           0x0000000104455fdc _PyEval_EvalFrameDefault + 23696
	25  python3.8                           0x000000010438df94 function_code_fastcall + 120
	26  python3.8                           0x00000001044587fc call_function + 288
	27  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	28  python3.8                           0x000000010438df94 function_code_fastcall + 120
	29  python3.8                           0x00000001044587fc call_function + 288
	30  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	31  python3.8                           0x000000010438df94 function_code_fastcall + 120
	32  python3.8                           0x00000001044587fc call_function + 288
	33  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	34  python3.8                           0x000000010438df94 function_code_fastcall + 120
	35  python3.8                           0x00000001044587fc call_function + 288
	36  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	37  python3.8                           0x0000000104459830 _PyEval_EvalCodeWithName + 3220
	38  python3.8                           0x000000010438e114 _PyFunction_Vectorcall + 248
	39  python3.8                           0x000000010438d380 _PyObject_FastCallDict + 116
	40  python3.8                           0x000000010438eb14 _PyObject_Call_Prepend + 140
	41  python3.8                           0x00000001043e89d8 slot_tp_init + 184
	42  python3.8                           0x00000001043e38c4 type_call + 312
	43  python3.8                           0x000000010438d5d4 _PyObject_MakeTpCall + 372
	44  python3.8                           0x000000010445889c call_function + 448
	45  python3.8                           0x00000001044560c4 _PyEval_EvalFrameDefault + 23928
	46  python3.8                           0x000000010438df94 function_code_fastcall + 120
	47  python3.8                           0x00000001044587fc call_function + 288
	48  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	49  python3.8                           0x0000000104459830 _PyEval_EvalCodeWithName + 3220
	50  python3.8                           0x000000010438e114 _PyFunction_Vectorcall + 248
	51  python3.8                           0x00000001044587fc call_function + 288
	52  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	53  python3.8                           0x000000010438df94 function_code_fastcall + 120
	54  python3.8                           0x0000000104397940 property_descr_get + 108
	55  python3.8                           0x00000001043d13a8 _PyObject_GenericGetAttrWithDict + 196
	56  python3.8                           0x0000000104454910 _PyEval_EvalFrameDefault + 17860
	57  python3.8                           0x000000010438df94 function_code_fastcall + 120
	58  python3.8                           0x0000000104397940 property_descr_get + 108
	59  python3.8                           0x00000001043d13a8 _PyObject_GenericGetAttrWithDict + 196
	60  python3.8                           0x0000000104454910 _PyEval_EvalFrameDefault + 17860
	61  python3.8                           0x000000010438df94 function_code_fastcall + 120
	62  python3.8                           0x0000000104390550 method_vectorcall + 156
	63  python3.8                           0x00000001044587fc call_function + 288
	64  python3.8                           0x0000000104456050 _PyEval_EvalFrameDefault + 23812
	65  python3.8                           0x000000010438df94 function_code_fastcall + 120
	66  python3.8                           0x00000001044587fc call_function + 288
	67  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	68  python3.8                           0x0000000104459830 _PyEval_EvalCodeWithName + 3220
	69  python3.8                           0x000000010438e114 _PyFunction_Vectorcall + 248
	70  python3.8                           0x00000001044587fc call_function + 288
	71  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	72  python3.8                           0x000000010438df94 function_code_fastcall + 120
	73  python3.8                           0x00000001044587fc call_function + 288
	74  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	75  python3.8                           0x000000010438df94 function_code_fastcall + 120
	76  python3.8                           0x00000001044587fc call_function + 288
	77  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	78  python3.8                           0x0000000104459830 _PyEval_EvalCodeWithName + 3220
	79  python3.8                           0x000000010438e114 _PyFunction_Vectorcall + 248
	80  python3.8                           0x00000001044587fc call_function + 288
	81  python3.8                           0x0000000104455fc0 _PyEval_EvalFrameDefault + 23668
	82  python3.8                           0x000000010438df94 function_code_fastcall + 120
	83  python3.8                           0x00000001044587fc call_function + 288
	84  python3.8                           0x0000000104456050 _PyEval_EvalFrameDefault + 23812
	85  python3.8                           0x0000000104459830 _PyEval_EvalCodeWithName + 3220
	86  python3.8                           0x00000001044502b8 PyEval_EvalCode + 60
	87  python3.8                           0x0000000104494ab4 PyRun_SimpleFileExFlags + 812
	88  python3.8                           0x00000001044b2204 Py_RunMain + 1696
	89  python3.8                           0x00000001044b26cc pymain_main + 340
	90  python3.8                           0x00000001044b2748 Py_BytesMain + 40
	91  dyld                                0x000000010481d0f4 start + 520
)
libc++abi: terminating with uncaught exception of type NSException
zsh: abort      poetry install

Python Version -> 3.8.13

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
abncommented, May 13, 2022

@SiddChugh I’m going to close this for now as there isn’t much to go by here that indicates it is a Poetry issue.

I’d recommend you make sure you are not using an install from the old installer (get-poetry.py). And maybe check your Python install. Alternatively try installing Poetry with another installation method https://python-poetry.org/docs/master/#installation.

If you have more information on why this is a Poetry issue please comment, we can reopen then.

0reactions
harryciscommented, Nov 19, 2022

@SiddChugh thanks for the tips. After remove virtualenv, run poetry lock I got [Errno 2] No such file or directory: '/Users/xxxx/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/xattr/lib_build.h' re-run poetry lock then the same crash shows up again

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python poetry install failure - invalid hashes - Stack Overflow
There are several issue reports about invalid hashes. One common cause is running multiple Poetry instances simultaneously; ...
Read more >
Please support tensorflow-text-macos - Apple Developer
I tried to revert my tensorflow-macos to 2.9, but when I work with it, it throws an error "zsh: bus error". It's not...
Read more >
Why new Macs break your Docker build, and how to fix it
New Macs can break your Docker image build in unexpected ways; learn why, and how to fix it.
Read more >
How to Manage Multiple Python Versions on an Apple Silicon ...
How to Manage Multiple Python Versions on an Apple Silicon M1 Mac. Install both ARM64 and x86 Python versions and seamlessly switch between...
Read more >
Run Stable Diffusion on Your M1 Mac's GPU - Hacker News
You can now run the Lstein fork[1] with M1 as of a few hours ago. ... It kept throwing the "leaked semaphor objects"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found