Skip to content

Commit 848d283

Browse files
committed
error if not pathlib.Path
Signed-off-by: Valerie Gleason 👌 <[email protected]>
1 parent 99e4218 commit 848d283

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/nipanel/_streamlit_panel_initializer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def create_streamlit_panel(streamlit_script_path: Path, panel_id: str = "") -> S
3434
raise RuntimeError(
3535
"nipanel.create_panel() should not be called from a Streamlit script. Call nipanel.get_panel_accessor() instead."
3636
)
37+
if not isinstance(streamlit_script_path, Path):
38+
raise TypeError("The provided script path must be a pathlib.Path instance.")
3739

3840
if streamlit_script_path.suffix != ".py":
3941
raise ValueError(

0 commit comments

Comments
 (0)