Skip to content

Commit 11749dd

Browse files
Update pandasai/core/response/parser.py
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent d2eaef4 commit 11749dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandasai/core/response/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _validate_response(self, result: dict):
8585
return True
8686

8787
path_to_plot_pattern = r"^(\/[\w.-]+)+(/[\w.-]+)*$|^[^\s/]+(/[\w.-]+)*$"
88-
if not bool(re.match(path_to_plot_pattern, result["value"])):
88+
if isinstance(result["value"], str) and not bool(re.match(path_to_plot_pattern, result["value"])):
8989
raise InvalidOutputValueMismatch(
9090
"Invalid output: Expected a plot save path str but received an incompatible type."
9191
)

0 commit comments

Comments
 (0)