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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
essentially i'm just going through the sidekiq retries and getting the file_set ids and then running:
fs=FileSet.find('abc123def')service=Spot::RemoteCharacterizationService.new(fs.characterization_proxy,Hyrax::WorkingDirectory.find_or_retrieve(fs.characterization_proxy.id,fs.id),{})service.characterize# note which field has invalid values, it'll either be `:file_title` or `:file_author`service.object.creator=service.object.creator.map{ |v| v.encode('UTF-8',invalid: :replace,replace: '')}service.object.save!# then create derivativesCreateDerivativesJob.perform_now(fs,fs.files.first.id,Hyrax::WorkingDirectory.find_or_retrieve(fs.files.first.id,fs.id))
this was a particularly nasty one i just worked through. a pdf sent to the characterization process returned:
and trying to run
file_set.characterization_proxy.save!
after updating the metadata threw anArgumentError: invalid byte sequence in UTF-8
.running this strips out the invalid bytes:
so we might want to do something like that?
relative source code:
https://github.com/samvera/hydra-works/blob/master/lib/hydra/works/services/characterization_service.rb#L105-L111
The text was updated successfully, but these errors were encountered: