diff --git a/python/jupytergis_qgis/jupytergis_qgis/handlers.py b/python/jupytergis_qgis/jupytergis_qgis/handlers.py index 4de5d5d2..27551b59 100644 --- a/python/jupytergis_qgis/jupytergis_qgis/handlers.py +++ b/python/jupytergis_qgis/jupytergis_qgis/handlers.py @@ -39,7 +39,10 @@ def post(self): elif not virtual_file: raise HTTPError(400, "The file content is missing") - absolute_path = os.path.join(self.settings["server_root_dir"], path) + absolute_path = os.path.join( + os.path.expanduser(self.settings["server_root_dir"]), + path + ) logs = export_project_to_qgis(absolute_path, virtual_file) self.finish(json.dumps({ "exported": len(logs["errors"]) == 0,