miku / metha

Command line OAI-PMH harvester and client with built-in cache.
https://lab.ub.uni-leipzig.de/en/metha/
GNU General Public License v3.0
118 stars 13 forks source link

Date Parsing Issue #38

Closed tobiasschweizer closed 7 months ago

tobiasschweizer commented 8 months ago

Hi @miku,

I have encountered an issue occurring when trying to parse an empty string as a date. I am not sure whether this is a problem with the OAI-PMH endpoint doing something illegal or metha itself (not sure if the OAI-PMH specs allow for empty strings as dates).

This is what I got for metha-sync -base-dir . -format marcxml "https://zentralgut.ch/oai":

INFO[0000] https://zentralgut.ch/oai?verb=Identify INFO[0000] harvest: &{BaseURL:https://zentralgut.ch/oai Format:marcxml Set: From: Until: Client:0xc00010c640 MaxRequests:1048576 DisableSelectiveHarvesting:false CleanBeforeDecode:true IgnoreHTTPErrors:false MaxEmptyResponses:10 SuppressFormatParameter:false HourlyInterval:false DailyInterval:false ExtraHeaders:map[] KeepTemporaryFiles:false Delay:0 Identify:0xc000488938 Started:0001-01-01 00:00:00 +0000 UTC Mutex:{state:0 sema:0}} FATA[0000] parsing time "" as "2006-01-02T15:04:05Z": cannot parse "" as "2006"

I am using metha 0.2.57.

I could make it work providing the -from option. 2006-01-02 occurs as a sample for -from date in the docs. So that's maybe which this is mentioned in the error message?

Thanks for your feedback and kind regards,

Tobias

miku commented 7 months ago

Hi @tobiasschweizer, I'm sorry for the late follow-up. That metha error message is not very helpful, indeed.

Here's the screenshot of https://zentralgut.ch/oai as of 2024-03-06:

Seems like a problem w/ the site.

tobiasschweizer commented 7 months ago

@miku no problem :-)

Ok, I think I will report that then. Thanks!