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

Fix for issue 89, now works with PyObjC 3.0+ #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

igorbogdanov
Copy link

@igorbogdanov igorbogdanov commented Apr 13, 2017

Due to the change of rules for mapping python into obj-c in 3.0+ versions of PyObjC this command line tool could not be used with 3.0+ PyObjC, generating Error described in in Issue 89. The issue is now fixed, but not sure if it is backwards compatible so suggest having this fix as a separate branch.

@paulhammond
Copy link
Owner

Thanks for submitting this fix. I tried it on my Mac (Catalina, 10.15.3) which has pyobjc 2.5.1 installed, and I get this error:

Traceback (most recent call last):
  File "./webkit2png2", line 78, in <module>
    class WebkitLoad (Foundation.NSObject, objc.protocolNamed('WebFrameLoadDelegate')):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc/_protocols.py", line 33, in protocolNamed
    raise ProtocolError("protocol %r does not exist" % (name,), name)
objc.ProtocolError: ("protocol u'WebFrameLoadDelegate' does not exist", u'WebFrameLoadDelegate')

My goal with webkit2png is to have it work out of the box on a Mac, without having to install extra software, so a version that doesn't work with 2.5.1 isn't an option. I don't know if there's a backwards compatible way to make this work for both versions of pyobjc?

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

Successfully merging this pull request may close these issues.

2 participants