Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make shotgun api usable with pyinstaller #123

Open
dreh23 opened this issue Sep 22, 2016 · 1 comment
Open

Make shotgun api usable with pyinstaller #123

dreh23 opened this issue Sep 22, 2016 · 1 comment

Comments

@dreh23
Copy link

dreh23 commented Sep 22, 2016

We're trying to use pyinstaller for easy internal deployment of a single executable written in python.

Compiling works:

pyinstaller sgflop.py -F --upx-dir=/usr/bin/ --hidden-import=shotgun_api3 --hidden-import=ssl --hidden-import=httplib2 --hidden-import=_ssl --hidden-import=certifi --hidden-import=os

Execution fails with this error:

Traceback (most recent call last):
  File "sgflop.py", line 25, in <module>
  File "shotgun_api3/shotgun.py", line 439, in __init__
  File "shotgun_api3/shotgun.py", line 458, in server_caps
  File "shotgun_api3/shotgun.py", line 485, in info
  File "shotgun_api3/shotgun.py", line 1640, in _call_rpc
  File "shotgun_api3/shotgun.py", line 1761, in _make_call
  File "shotgun_api3/shotgun.py", line 1779, in _http_request
  File "shotgun_api3/lib/httplib2/__init__.py", line 1448, in request
  File "shotgun_api3/lib/httplib2/__init__.py", line 1200, in _request
  File "shotgun_api3/lib/httplib2/__init__.py", line 1135, in _conn_request
  File "shotgun_api3/lib/httplib2/__init__.py", line 902, in connect
  File "shotgun_api3/lib/httplib2/__init__.py", line 84, in _ssl_wrap_socket
  File "ssl.py", line 381, in wrap_socket
  File "ssl.py", line 141, in __init__
ssl.SSLError: [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
Failed to execute script sgflop

I found a solution in this thread. Now it works, but I believe this should be elegantly implemented in the httplib2 lib inside shotgun.

Is this something you would include if I file a pull request? Any suggestion how to wrap the certficate in the code?

P.S. Did I mention I would prefer to use a go package for shotgun

@kporangehat
Copy link

Thanks for the info. We have similar documentation on our documentation site. We will look into this option though.

Thanks for sending this along!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants