esrc-unimelb / CNEX3

The Contextual Network Explorer: A visualisation tool for EAC-CPF files
https://connex.esrc.unimelb.edu.au
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

"No EAC reference to XML source in: %s" error is misleading #7

Open czk2010 opened 6 years ago

czk2010 commented 6 years ago

https://github.com/esrc-unimelb/CNEX3/blob/867a7a88a0c2b67686e344623a08d204a0bf06a4/service/app/Entity.py#L153

This error can occur for a couple of reasons first there is actually no EAC reference in the related object ie. AWE0910.xml has a href to http://nla.gov.au/nla.party-544549 but that site doesn't have an EAC tag in the metadata. In this case the message is correct but this should not raise an IOError

the second case is where the reference actually does have an EAC tag but the file it points to is missing ie. AWAP/biogs/AWE0569b.htm has a valid EAC tag which maps to AWAP/eac/AWE0569.xml but that file does not exist. In this case the IOError is valid but the message is incorrect

too much going in the one try block...