Fatal Python error on importing fusionscript.so

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline
User avatar

Igor Riđanović

  • Posts: 1656
  • Joined: Thu Jul 02, 2015 5:11 am
  • Location: Los Angeles, Calif.

Fatal Python error on importing fusionscript.so

PostThu Sep 06, 2018 7:33 pm

I'm having an issue importing fusionscript.so on High Sierra with Anaconda Python 2.7.15. The 'path' contains the valid path to the MacOS location of fusionscript.so:

Code: Select all
script_module = imp.load_dynamic("fusionscript", path + "fusionscript.so"


It throws:

Code: Select all
Fatal Python error: PyhreadState_Get: no current thread
Abort trap: 6


I suspect this has to do with multiple Python interpreters on the host. In fact, if I disable the Anaconda Python and use the stock 2.7.10 Python that came installed with High Sierra, I can import fusionscript.so and the Resolve scripting API is fully operational.

Prior to installing the Anaconda version, I used Brew to install Python and faced the same issue.

If there is anyone who has (Python) scripting working on a Mac, I'd love to learn how exactly they installed Python.
www.metafide.com - DaVinci Resolve™ Apps
Offline
User avatar

Igor Riđanović

  • Posts: 1656
  • Joined: Thu Jul 02, 2015 5:11 am
  • Location: Los Angeles, Calif.

Re: Fatal Python error on importing fusionscript.so

PostTue Sep 18, 2018 6:34 pm

We tested import of fusionscript.so on eight or so Macs (thank you everyone who participated).

The import failed 100% of the time where the active Python was a user installed 2.7 version. These interpreters were installed via Brew, Macports, and Anaconda. Brew Python 3 also failed to import fusionscript.so as reported on one machine.

The default 2.7 Python that comes with MacOS imported fusionscript.so 100% of the time.

This precludes the ability to run external scripts on MacOS, unless one depends on the default Python. However this is impractical and limiting.

The specific error is quoted in the previous post. Anyone curious in testing their own Mac can run this script: https://github.com/IgorRidanovic/DaVinv ... apitest.py
www.metafide.com - DaVinci Resolve™ Apps

petertimberlake

Re: Fatal Python error on importing fusionscript.so

PostWed Sep 19, 2018 4:56 pm

I was also part of Igor's DIY test group that tested this out with the stock mac install of python, and it properly recognize and imported the fusionscript.so. But the interpreter would not interact with the resolve API. Is this 100% because I'm using the free version? Is there somewhere that documents this?

here is the log from Igor's responsiveness utility script:



...
...
Python Version: 2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
Interpreter Path: /usr/bin/python

If no lines follow we have likely experienced a Fatal Python Error.
Imported fusionscript.so
Resolve instance is created, but Resolve is not found.



The real point of raising this issue is that it underscores the crazy lack of documentation on a *KEY* release of the new Resolve, especially for us mid-to-large facility types. Is there any documentation coming?

Return to DaVinci Resolve

Who is online

Users browsing this forum: alkessler, Bing [Bot], ShutterlabCreative and 195 guests