Complete error
Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay() != currentlyBuildingLayerTree), function NSViewSetCurrentlyBuildingLayerTreeForDisplay
Solution
Because matplotlib is used in the backend, Add the following codes in the drawing code:
import matplotlib
matplotlib.use('Agg')
Then use the following code after the drawing is over:
plt.close()
Read More:
- [Solved] Django backend processing Base64 file upload error
- [Solved] Django Access to the backend error: Invalid block tag on line 98: ‘trans‘, expected ‘elif , ‘else‘或‘ endif. Did you forget
- cffi Security Report “c / _cffi_backend.oc / _cffi_backend.c: 15:17: error: ffi.h: No such file or directory” Problem
- [Solved] Django project locally Open Error: importerror: couldn’t import Django
- Python: Django exception when executing migrate operation: django.db.utils.OperationalError: (1051, “Unknown table’xxx’”)
- [Solved] Django Configurate celery error: django.db.utils.DatabaseError
- [Solved] error: (-215:Assertion failed) !_src.empty() in function ‘cv::cvtColor‘
- [Solved] Django Error: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
- [Solved] Python Django error: error: (1146, “Table ‘mydb.django_session’ doesn’t exist”)
- v2.error: OpenCV(4.5.5) error: (-215:Assertion failed) npoints > 0 in function ‘cv::drawContours‘
- error: (-5:Bad argument) in function ‘seamlessClone‘ and error: (-215:Assertion failed) 0 <= roi.x && 0 [How to Solve]
- [Solved] error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘imshow‘
- [Solved] cv2.error: (-215:Assertion failed) encoder->isFormatSupported(CV_8U) in function ‘imwrite_‘
- [Solved] cv2.error: OpenCV(4.5.1) XXX\shapedescr.cpp:315: error: (-215:Assertion failed) npoints >= 0 &&……
- [Solved] Python opencv imshow Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow
- [Solved] django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclie
- Django Issues: TypeError: “Settings” object is irreversible
- Django PythonConsole error: Requested setting DEFAULT_INDEX_TABLESPACE
- Django WSGI protocol application, based on wsgiref module DIY a web framework