dev-gpt icon indicating copy to clipboard operation
dev-gpt copied to clipboard

Python quit unexpectedly

Open janzheng opened this issue 1 year ago • 6 comments

Hi there,

I'm trying a basic example on an Intel Mac and getting "Python quit unexpectedly" while Docker is running. I'm logged into Jina and running locally.

Errors:

⠋ Waiting ... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/2 -:--:--🐳 The pulled image container does not support ARM architecture while the host machine relies on MacOS (Darwin).The image may run with poor performance or fail if run via emulation.                                                                            
⠧ Waiting deepcomplimentgeneratorexecutor1683106 gateway... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/2 0:00:00objc[59837]: +[__NSTimeZone initialize] may have been in progress in another thread when fork() was called.
objc[59837]: +[__NSTimeZone initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
⠏ Waiting deepcomplimentgeneratorexecutor1683106 gateway... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/2 0:00:00objc[59836]: +[__NSTimeZone initialize] may have been in progress in another thread when fork() was called.
objc[59836]: +[__NSTimeZone initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
⠏ Waiting deepcomplimentgeneratorexecutor1683106... ━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━ 1/2 0:01:19

janzheng avatar Apr 24 '23 08:04 janzheng

Hey @janzheng ,

can you try setting this environment variable before running it?

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

JoanFM avatar Apr 24 '23 09:04 JoanFM

heck yes that worked!!! (Could you please add that in the docs so I remember for the next time?)

janzheng avatar Apr 24 '23 22:04 janzheng

@florian-hoenicke, @joschkabraun you may want to put it. Jina puts that into your zsrhc or bashrc, but may not work for some other shells.

JoanFM avatar Apr 25 '23 07:04 JoanFM

@JoanFM great that you found the fix. We install jina in the requirements, so it should automatically set the environment variable right?

florian-hoenicke avatar Apr 25 '23 11:04 florian-hoenicke

In theory yes, but maybe for some shells or if some permissions are not there, it may fail to edit the bashrc, etc ...

Therefore it can be good to add

JoanFM avatar Apr 25 '23 13:04 JoanFM

fwiw I'm on Mac Intel OSX Ventura 13.2.1, vanilla bash

janzheng avatar Apr 25 '23 14:04 janzheng