From 4caba58d6c24476399fbb797def772018242b2e8 Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Wed, 1 Nov 2023 18:02:16 +0000 Subject: [PATCH] Revert to Sangaboard, rather than proscan --- src/openflexure_microscope_server/server.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/openflexure_microscope_server/server.py b/src/openflexure_microscope_server/server.py index 4b124484..699e7c28 100644 --- a/src/openflexure_microscope_server/server.py +++ b/src/openflexure_microscope_server/server.py @@ -5,7 +5,7 @@ import os.path from fastapi.staticfiles import StaticFiles from fastapi.responses import FileResponse, RedirectResponse from labthings_fastapi.thing_server import ThingServer -from labthings_sangaboard.proscan import ProScan +from labthings_sangaboard import SangaboardThing from labthings_picamera2.thing import StreamingPiCamera2 from .things.autofocus import AutofocusThing @@ -17,10 +17,13 @@ logging.basicConfig(level=logging.INFO) thing_server = ThingServer() thing_server.add_thing(StreamingPiCamera2(), "/camera/") -thing_server.add_thing(ProScan(), "/stage/") +thing_server.add_thing(SangaboardThing(), "/stage/") thing_server.add_thing(AutofocusThing(), "/autofocus/") thing_server.add_thing(CameraStageMapper(), "/camera_stage_mapping/") -add_static_files(thing_server.app) +try: + add_static_files(thing_server.app) +except RuntimeError: + print("Failed to add static files - you will have to do without them!") app = thing_server.app \ No newline at end of file