I'm running Djangorq on my virtualenv with python 3.8.6 as follows
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES;sudo python manage.py rqworker --with-scheduler
When I call any function as
django_rq.enqueue(func, request.user,arg=arg1)
Python crashes and I get this on my console:
+[NSPlaceholderString initialize] may have been in progress in another thread when fork() was called. objc[78776]: +[NSPlaceholderString 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. 12:33:17 Moving job to FailedJobRegistry (work-horse terminated unexpectedly; waitpid returned 6)
Before Monterey, I used to solve it with
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
But this doesn't seem to work anymore.
Any idea how to fix this?