예제 #1
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, username):
     message = (
         f"Username {username} doesn't have access to the given url. Please check your permissions "
         "or make sure that the username provided in the url matches the one used during login or ."
     )
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #2
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self):
     message = (
         "Unable to append to the dataset. "
         "The provided directory is not empty and doesn't contain information about any Hub Dataset "
     )
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #3
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, response):
     try:
         message = response.json()["message"]
     except (KeyError, AttributeError):
         message = "You are not authorized to access this resource on Snark AI."
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #4
0
 def __init__(self, response):
     try:
         message = "One or more request parameters is incorrect\n%s" % str(
             response.json()["message"])
     except (KeyError, AttributeError):
         message = "One or more request parameters is incorrect, %s" % str(
             response.content)
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #5
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self):
     message = (
         "Unable to overwrite the dataset. "
         "The provided directory is not empty and doesn't contain information about any Hub Dataset. "
         "This is a safety check so it won't be possible to overwrite (delete) any folder other than Dataset folder. "
         "If this error persists in case of Dataset folder then it means your Dataset data is corrupted. "
         "In that case feel free to create an issue in here https://github.com/activeloopai/Hub"
     )
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #6
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, exc_type):
     if exc_type == "none":
         message = "Parameter 'max_shape' shouldn't contain any 'None' value"
     elif exc_type == "length":
         message = "Lengths of 'shape' and 'max_shape' should be equal"
     elif exc_type == "not_equal":
         message = "All not-None values from 'shape' should be equal to the corresponding values in 'max_shape'"
     else:
         message = "Wrong 'shape' or 'max_shape' values"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #7
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(
     self,
     message="You are over the allowed limits for this operation. Consider upgrading your account.",
 ):
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #8
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, message=""):
     message = "Dask has been deprecated and made optional. Older versions of 0.x hub datasets require loading dask. Please install it: pip install 'dask[complete]>=2.30'"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #9
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, module_name):
     message = f"Module '{module_name}' should be installed to convert the Dataset to the {module_name} format"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #10
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, message="Invalid response from Snark AI server."):
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #11
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, message="Authentication failed. Please login again."):
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #12
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, dst_url):
     message = f"The destination url {dst_url} for copying dataset is not empty. Delete the directory manually or use Dataset.delete if it's a Hub dataset"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #13
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self):
     message = "Parameter 'schema' should be provided for Dataset creation."
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #14
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, response):
     message = f"The dataset with tag {response} was not found"
     super(HubDatasetNotFoundException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #15
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, response):
     message = f"No permision to store the dataset at {response}"
     super(PermissionException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #16
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, message="Resource locked."):
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #17
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, message="Timeout waiting for server state update."):
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #18
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, message="Snark AI server took too long to respond."):
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #19
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(
     self,
     message="The resource you are looking for was not found. Check if the name or id is correct.",
 ):
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #20
0
 def __init__(self, address):
     message = f"The address {address} does not refer to any existing branch or commit id. use create=True to create a new branch with this address"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #21
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self):
     message = "Unable to find dynamic tensor"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #22
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, param):
     message = f"Parameter '{param}' should be provided"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #23
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self):
     message = "First argument to transform function should be iterable"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #24
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self):
     message = "Parameter 'shape' should be a tuple of length 1"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #25
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, correct_shape, wrong_shape):
     message = f"parameter 'value': expected array with shape {correct_shape}, got {wrong_shape}"
     super(HubException, self).__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)
예제 #26
0
파일: exceptions.py 프로젝트: hjpvue/Hub
 def __init__(self, message="Internal Snark AI server error."):
     super().__init__(message=message)
     hub_reporter.error_report(self, tags=hub_tags)