-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.py
More file actions
39 lines (30 loc) · 1.34 KB
/
Copy patherrors.py
File metadata and controls
39 lines (30 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import util
import ai
def illegal_argument(x: int):
print("ERROR: Invalid Argument Call")
print(f"Expected {x} arguments.")
def segment_exists():
print("ERROR: This segment already exists with the same name.")
def segment_doesnt_exist():
print("ERROR: This segment does not exist.")
def setting_doesnt_exist():
print("ERROR: This setting has not been defined or doesnt exist.")
def invalid_setting():
print("ERROR: The setting could not be changed to the provided value. A typo perhaps?")
def data_not_downloaded():
print("ERROR: The data required to train the model is not yet installed.\n")
reply = util.ask("Install them now?> ")
if reply:
try:
ai.download_data()
except:
print("There was an error in downloading the data, are you connected to the internet?")
print("If error persists, contact the developers or start an issue at our repository.")
return True
return False
else:
return True
def segment_not_formated_correctly():
print("ERROR: The segment is not formatted correctly.")
print("Please ensure that the segment has a 'mask.png' file and a 'surface_volume' folder.")
print("If you are sure that the segment is formatted correctly, please contact the developers or start an issue at our repository.")