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

BF OSError: gamma.py can't find Carbon framework + better exception handling #1089

Merged
merged 3 commits into from Jan 22, 2016

Conversation

Projects
None yet
3 participants
@papr
Copy link
Contributor

papr commented Jan 22, 2016

gamma.py looks for the Carbon framework in the wrong place under OS X 10.11. The framework binary was moved from

/System/Library/Carbon.framework/Carbon
to

/System/Library/Frameworks/Carbon.framework/Carbon
Additionally gamma.py only calls the CGSetDisplayTransferByTable(,,,,). This function was moved to the CoreGraphics framework.

Therefore, my suggestion is that gamma.py should try to load the CoreGraphics framework first and should use the Carbon framework only as fallback.

I implemented better exception handling additionally to pull request #1084

Pablo Prietz
BF OSError: gamma.py can't find Carbon framework
gamma.py looks for the Carbon framework in the wrong place under OS X 10.11. The framework binary was moved from
> /System/Library/Carbon.framework/Carbon
to
> /System/Library/Frameworks/Carbon.framework/Carbon

Additionally gamma.py only calls the CGSetDisplayTransferByTable(,,,,). This function was moved to the CoreGraphics framework.

Therefore, my suggestion is that gamma.py should try to load the CoreGraphics framework first and should use the Carbon framework only as fallback.
@jeremygray

This comment has been minimized.

Copy link

jeremygray commented on psychopy/visual/gamma.py in fc2ca8d Jan 18, 2016

Seems better as just except Exception: (or ideally a more specific error class if possible, like OSError). And except Exception as e: (that is: using as instead of a comma) is the way to go if you need to do something with e.

peircej added a commit that referenced this pull request Jan 22, 2016

Merge pull request #1089 from papr/master
BF OSError: gamma.py can't find Carbon framework + better exception handling

@peircej peircej merged commit cf60451 into psychopy:master Jan 22, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@peircej

This comment has been minimized.

Copy link
Member

peircej commented Jan 22, 2016

Thanks Pablo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.