Skip to content

Commit

Permalink
uses ValueError and VisitNotFound
Browse files Browse the repository at this point in the history
  • Loading branch information
David Erb committed Apr 26, 2023
1 parent 0a839f4 commit f5517b9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rockingester_lib/collectors/direct_poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dls_utilpack.callsign import callsign
from dls_utilpack.explain import explain2
from dls_utilpack.require import require
from dls_utilpack.visit import get_xchem_directory
from dls_utilpack.visit import VisitNotFound, get_xchem_directory
from PIL import Image

# Dataface client context.
Expand Down Expand Up @@ -246,15 +246,20 @@ async def scrape_plates_directory(
self.__visits_directory, crystal_plate_model.visit
)
)
except ValueError:
pass
except VisitNotFound:
pass

if visit_directory is not None:
await self.scrape_plate_directory(
plates_directory / plate_name,
crystal_plate_model,
visit_directory,
)
# This barcode is in the database, but the visit name
# is not properly formatted or the visit directory doesn't exist.
except Exception as exception:
else:
# For now, don't move these out of SubwellImages since Texrank expects them here.
# TODO: Find out how to disable Texrank jobs from running at all.
# await self.__move_without_ingesting(
Expand Down

0 comments on commit f5517b9

Please sign in to comment.