Page MenuHomePhabricator

Upload with ignore_warnings iterable set causes failures
Closed, ResolvedPublic


It seems impossible to upload the jpeg versions of TIFFs using ignore_warnings set to ['exists-normalized']. This is when using site.upload() with the defaults and source_url correctly set, source_filename = None and chunk_size = 1048576.

Examining, the upload function runs one-time but then falls over at

raise ValueError('Can request stash information only when 'using a file name.')

as on the second pass offset is True.

I'd appreciate either a fix, or advice on how to work-around if this is a known error. I tried debugging this and working-around it for a while, but I find the design non-intuitive, so I may be missing the point of some part of it. It could be that the issue is how parameters get dropped/passed on (especially ignore_warnings) as it iterates, but I'm finding it hard to visualize.

As an example, in the NYPL I'm attempting to upload a jpeg when a TIFF exists under the same name:

Event Timeline

It's possible that the fix for T294916 has fixed this as well. Certainly my very similar-looking problem (T174351) has been solved.

Xqt claimed this task.
Xqt removed Xqt as the assignee of this task.
Xqt subscribed.