TypeError: ‘encoding’ is an invalid keyword argument for this function
# -*- coding: utf-8 -*-
test_1 = "中文"
with io.open("test.txt", "w", encoding="utf-8") as f:
with open("test.txt", "r") as f:
test_2 = unicode(f.read(), "utf-8")
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.