We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 32b7c04 + 3441c1a commit 872665bCopy full SHA for 872665b
1 file changed
scrapinghub/client/utils.py
@@ -56,14 +56,17 @@ def parse_job_key(job_key):
56
elif isinstance(job_key, six.string_types):
57
parts = job_key.split('/')
58
else:
59
- raise ValueError("Job key should be a string or a tuple")
+ raise ValueError("Job key should be a string or a tuple, got {}: {}"
60
+ .format(type(job_key), repr(job_key)))
61
if len(parts) != 3:
62
raise ValueError(
- "Job key should consist of project_id/spider_id/job_id")
63
+ "Job key should consist of project_id/spider_id/job_id, got {}"
64
+ .format(repr(job_key)))
65
try:
66
list(map(int, parts))
67
except ValueError:
- raise ValueError("Job key parts should be integers")
68
+ raise ValueError("Job key parts should be integers, got {}"
69
70
return JobKey(*map(str, parts))
71
72
0 commit comments