Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Visual Studio を使用して Python C 拡張機能をデバッグすると、「PyThreadState_Get: no current thread」というメッセージが表示されてプログラムが中止されます。
リリースでは、プログラムは正常に動作し、デバッグ情報を追加しても正常に動作します。
問題を解決するには?
NDEBUG が定義されている場合は、インタープリター python_d.exe のデバッグ バージョンを使用する必要があります。
さらに、拡張機能の名前が myextension の場合、リリースでの Dll の名前は myextension.pyd である必要がありますが、デバッグでの Dll の名前は myextension_d.pyd である必要があります。