Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Error when capturing multiple URLs #63

Open
norm opened this Issue · 5 comments

4 participants

@norm

When capturing multiple URLs from one instance of webkit2png, the following error occurs:

Python[10560:1107] *** WebKit discarded an uncaught exception in the webView:didFinishLoadForFrame: delegate: <NSUnknownKeyException> [<DOMAbstractView 0x7ff0650d3b30> valueForUndefinedKey:]: this class is not key value coding-compliant for the key webkit2png.

Have tracked it down to the new Webkit2PngScriptBridge. With the code for that commented out, it works fine.

@norm

(cc @spicyj as the original author of that)

@paulhammond
Owner

I'm actually considering removing the ability to capture multiple urls in one webkit2png instance - it makes the code a lot messier, I'm fairly sure it's the source of a lot of bugs like this, it makes error handling difficult for calling scripts (because the entire process crashes when one url breaks) and it's not much easier than just using a bash for loop or similar.

On the other hand, it is slightly slower (although I haven't benchmarked this).

Thoughts?

@norm

I always used to capture one at a time, so this wouldn't upset me.

@norm norm referenced this issue from a commit in alphagov/webkit2png
@norm norm Remove ability to capture multiple URLs
As discussed in paulhammond#63,
webkit2png might be better capturing just one URL at a time.
7fc3be6
@RSully

I'd say we should strip out multiple URL support. The complexity isn't worth the limited functionality. It would be easy enough to add another script that takes a bunch of URLs and any webkit2png options and launches n processes, if someone really wanted out-of-the-box functionality.

@bschneider45701

@norm: Could you please provide more detail on what you commented? I have a need to process multiple URLs without the added slowdown of re-initializing WebKit. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.