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