Spaces:
Sleeping
Sleeping
Fix handling of 404 file search
Browse files
tools.py
CHANGED
@@ -193,8 +193,10 @@ class APIProcessor:
|
|
193 |
Returns:
|
194 |
Parsed text output of the attachment
|
195 |
"""
|
|
|
|
|
|
|
196 |
response = requests.get(self.file_url, timeout=15)
|
197 |
-
response.raise_for_status()
|
198 |
|
199 |
file_extension = self.file_name.split(".")[-1]
|
200 |
|
|
|
193 |
Returns:
|
194 |
Parsed text output of the attachment
|
195 |
"""
|
196 |
+
if not self.file_name:
|
197 |
+
return "No attached file for this question"
|
198 |
+
|
199 |
response = requests.get(self.file_url, timeout=15)
|
|
|
200 |
|
201 |
file_extension = self.file_name.split(".")[-1]
|
202 |
|