PSLmodels / OG-Core

An overlapping generations model framework for evaluating fiscal policies.
https://pslmodels.github.io/OG-Core/
Creative Commons Zero v1.0 Universal
65 stars 111 forks source link

run_ogcore_example.py crashes before completion #918

Closed JohnGWS closed 5 months ago

JohnGWS commented 5 months ago

When running the example simulation ('run_ogcore_example.py'), the execution commences properly but crashes after the output line 'Government spending breakpoints are tG1: 20 ; and tG2: 256'. The balance of the output from the CMD environment is copied below:

2024-03-26 19:07:03,156 - distributed.protocol.core - CRITICAL - Failed to deserialize Traceback (most recent call last): File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\protocol\core.py", line 160, in loads return msgpack.loads( ^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 128, in unpackb ret = unpacker._unpack() ^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 565, in _unpack ret.append(self._unpack(EX_CONSTRUCT)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 592, in _unpack ret[key] = self._unpack(EX_CONSTRUCT) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 565, in _unpack ret.append(self._unpack(EX_CONSTRUCT)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 592, in _unpack ret[key] = self._unpack(EX_CONSTRUCT) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 592, in _unpack ret[key] = self._unpack(EX_CONSTRUCT) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 602, in _unpack obj = obj.decode("utf_8", self._unicode_errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 1: invalid start byte 2024-03-26 19:07:03,164 - distributed.core - ERROR - Exception while handling op register-client Traceback (most recent call last): File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\core.py", line 968, in _handle_comm result = await result ^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\scheduler.py", line 5532, in add_client await self.handle_stream(comm=comm, extra={"client": client}) File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\core.py", line 1023, in handle_stream msgs = await comm.read() ^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\comm\tcp.py", line 248, in read msg = await from_frames( ^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\comm\utils.py", line 78, in from_frames res = _from_frames() ^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\comm\utils.py", line 61, in _from_frames return protocol.loads( ^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\protocol\core.py", line 160, in loads return msgpack.loads( ^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 128, in unpackb ret = unpacker._unpack() ^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 565, in _unpack ret.append(self._unpack(EX_CONSTRUCT)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 592, in _unpack ret[key] = self._unpack(EX_CONSTRUCT) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 565, in _unpack ret.append(self._unpack(EX_CONSTRUCT)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 592, in _unpack ret[key] = self._unpack(EX_CONSTRUCT) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 592, in _unpack ret[key] = self._unpack(EX_CONSTRUCT) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 602, in _unpack obj = obj.decode("utf_8", self._unicode_errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 1: invalid start byte Task exception was never retrieved future: <Task finished name='Task-605' coro=<Server._handle_comm() done, defined at C:\Users\johnG\anaconda3\Lib\site-packages\distributed\core.py:874> exception=UnicodeDecodeError('utf-8', b'd\x90?0}\x947?\xfc\x83?g\xaa\xcc\n\xb4\xb4\x87?\x7f\xe1', 1, 2, 'invalid start byte')> Traceback (most recent call last): File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\core.py", line 968, in _handle_comm result = await result ^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\scheduler.py", line 5532, in add_client await self.handle_stream(comm=comm, extra={"client": client}) File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\core.py", line 1023, in handle_stream msgs = await comm.read() ^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\comm\tcp.py", line 248, in read msg = await from_frames( ^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\comm\utils.py", line 78, in from_frames res = _from_frames() ^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\comm\utils.py", line 61, in _from_frames return protocol.loads( ^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\protocol\core.py", line 160, in loads return msgpack.loads( ^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 128, in unpackb ret = unpacker._unpack() ^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 565, in _unpack ret.append(self._unpack(EX_CONSTRUCT)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 592, in _unpack ret[key] = self._unpack(EX_CONSTRUCT) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 565, in _unpack ret.append(self._unpack(EX_CONSTRUCT)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 592, in _unpack ret[key] = self._unpack(EX_CONSTRUCT) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 592, in _unpack ret[key] = self._unpack(EX_CONSTRUCT) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\msgpack\fallback.py", line 602, in _unpack obj = obj.decode("utf_8", self._unicode_errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 1: invalid start byte Traceback (most recent call last): File "C:\Python\Scripts\run_ogcore_example.py", line 136, in main() File "C:\Python\Scripts\run_ogcore_example.py", line 78, in main runner(p, time_path=True, client=client) File "C:\Users\johnG\anaconda3\Lib\site-packages\ogcore\execute.py", line 69, in runner tpi_output = TPI.run_TPI(p, client=client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\ogcore\TPI.py", line 741, in run_TPI results = client.gather(futures) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\client.py", line 2384, in gather return self.sync( ^^^^^^^^^^ File "C:\Users\johnG\anaconda3\Lib\site-packages\distributed\client.py", line 2245, in _gather raise exc concurrent.futures._base.CancelledError: inner_loop-1a60f3d8-f932-449f-aa21-3dd4b82d70dc

JohnGWS commented 5 months ago

Updating 'msgpack' and 'distributed' was required