-
-
Save wontheone1/effe5ecedc043ac5a99488fea2c218dd to your computer and use it in GitHub Desktop.
Error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 0 0 0 0 | |
IMPOSSIBLE | |
1 1 0 0 | |
1 1 0 1 | |
0 0 0 0 | |
--------------------------------------------------------------------------- | |
_RemoteTraceback Traceback (most recent call last) | |
_RemoteTraceback: | |
""" | |
Traceback (most recent call last): | |
File "/Users/wseobseo/anaconda3/lib/python3.7/concurrent/futures/process.py", line 232, in _process_worker | |
r = call_item.fn(*call_item.args, **call_item.kwargs) | |
File "/Users/wseobseo/anaconda3/lib/python3.7/concurrent/futures/process.py", line 191, in _process_chunk | |
return [fn(*args) for args in chunk] | |
File "/Users/wseobseo/anaconda3/lib/python3.7/concurrent/futures/process.py", line 191, in <listcomp> | |
return [fn(*args) for args in chunk] | |
File "<ipython-input-4-0102cbd00141>", line 112, in execute | |
color_set = get_color_set(case.num_colors, case.customers, is_satisfied) | |
File "<ipython-input-4-0102cbd00141>", line 77, in get_color_set | |
color_set[num_c] = ColorType.MATTE | |
File "<ipython-input-4-0102cbd00141>", line 48, in __setitem__ | |
raise IndexError(f"color_code starts from 1 not 0: given {color_code}") | |
IndexError: color_code starts from 1 not 0: given -1 | |
""" | |
The above exception was the direct cause of the following exception: | |
IndexError Traceback (most recent call last) | |
<ipython-input-5-f6ada63ea063> in <module>() | |
1 cases = read_cases('input.txt') | |
2 with futures.ProcessPoolExecutor() as executor: | |
----> 3 for case, verdict in zip(cases, executor.map(execute, cases)): | |
4 print(f"{verdict}") | |
~/anaconda3/lib/python3.7/concurrent/futures/process.py in _chain_from_iterable_of_lists(iterable) | |
474 careful not to keep references to yielded objects. | |
475 """ | |
--> 476 for element in iterable: | |
477 element.reverse() | |
478 while element: | |
~/anaconda3/lib/python3.7/concurrent/futures/_base.py in result_iterator() | |
584 # Careful not to keep a reference to the popped future | |
585 if timeout is None: | |
--> 586 yield fs.pop().result() | |
587 else: | |
588 yield fs.pop().result(end_time - time.time()) | |
~/anaconda3/lib/python3.7/concurrent/futures/_base.py in result(self, timeout) | |
430 raise CancelledError() | |
431 elif self._state == FINISHED: | |
--> 432 return self.__get_result() | |
433 else: | |
434 raise TimeoutError() | |
~/anaconda3/lib/python3.7/concurrent/futures/_base.py in __get_result(self) | |
382 def __get_result(self): | |
383 if self._exception: | |
--> 384 raise self._exception | |
385 else: | |
386 return self._result | |
IndexError: color_code starts from 1 not 0: given -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment