Thanks for your reply Justin.

I though I had tried this, but I had another look.

- If I import the nuke module at the top of the script (before importing
PySide) the nuke module imports without an error. But instead i get this
when trying to open the PySide panel:

*RuntimeError: A QApplication instance already exists.*

*- *If I import the nuke module at the top (but after PySide) I get a
Windows pop-up. Seems like a crash?

*python.exe Entry point not found. Could not be found in QtGui4.dll*

Is all this a conflict because Nuke ships with it's own version of PySide
and that's what's used in the nuke module?



-------------------------------
Simon Björk
Compositor/TD

+46 (0)70-2859503
www.bjorkvisuals.com

2016-03-20 12:48 GMT+01:00 Justin GD <j.grosde...@gmail.com>:

> Hi Simon,
>
> Could it be because you import nuke in your slot ? Meaning that the scope
> is that function only ?
>
>
> http://stackoverflow.com/questions/3095071/in-python-what-happens-when-you-import-inside-of-a-function
>
> Cheers,
> Justin
>
> 2016-03-19 22:25 GMT+00:00 Simon Björk <si...@bjorkvisuals.com>:
>
>> I'm trying to import the nuke module from a standalone PySide panel (not
>> launched from Nuke, using local Python install). See here
>> <http://pastebin.com/QPzdzaAS> for example code. It gives me an import
>> error saying it can't import a dll file.
>>
>> *ImportError: Failed to load C:\Program Files\Nuke9.0v8\nuke-9.0.8.dll*
>>
>> But if I run the same import code as a simple script without PySide it
>> works.
>>
>> sys.path.append("C:/Program Files/Nuke9.0v8/lib/site-packages")
>> os.environ["NUKE_INTERACTIVE"] = "1"
>> import nuke
>>
>> I have the Nuke9.0v8 folder in my systems PATH env (where the dll file is
>> located) but I still get the import error.
>>
>> It feels like I'm missing something obvious, but I can't get it to work.
>> Any ideas?
>>
>>
>> Best regards,
>> Simon
>>
>> -------------------------------
>> Simon Björk
>> Compositor/TD
>>
>> +46 (0)70-2859503
>> www.bjorkvisuals.com
>>
>> _______________________________________________
>> Nuke-python mailing list
>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to