0

importing shotgun_api3 in Maya 2012 causes Maya to crash

Hello,

If I run the following in the Maya 2012 python script editor:

from shotgun_api3 import Shotgun

Maya will immediately crash.  It also crashes if I just "import shotgun_api3".

 

Am I doing something wrong, or do I need to install anything special?  My python scripts run just fine from the command line and are able to import the Shotgun module with no problems.

Thank you for your help

1 comment

  • 0
    Avatar
    Armando Ricalde

    We had the same problem but with Maya 2011

    One of my devs solved it with a hack in the hashlib file included in python26.zip. 
    He commented some lines out: 

    # try: 
    # f = getattr(_hashlib, 'openssl_' + name) 
    # # Allow the C module to raise ValueError. The function will be 
    # # defined but the hash not actually available thanks to OpenSSL. 
    # f() 
    # # Use the C function directly (very fast) 
    # return f 
    # except (AttributeError, ValueError): 
    return __get_builtin_constructor(name)

    instead of using the C function it uses the builtin constructors, and adding the .so needed for md5 and the rest did the trick. 
    The crash ocurred when doing import hashlib.

Please sign in to leave a comment.