AB-CE / abce

Agent-based computational Economics, the Python library that makes AB modelling easier
http://abce.readthedocs.io
181 stars 62 forks source link

Trade logging error #186

Closed cha0sg0d closed 3 years ago

cha0sg0d commented 5 years ago

File "trade.pyx", line 703, in abcEconomics.trade.Trade._log_receive_accept_agent AttributeError: 'abcEconomics.trade.Offer' object has no attribute 'receiver_group'

I keep getting this error when attempting to log trade with either 'group' or individual'

Thanks! Let me know if you need more context.

rht commented 5 years ago

The bug seems to be that Offer used to have an attribute called receiver_group that is now receiver.

rht commented 5 years ago

The reason is that recently, trade.pyx and trade.py have been merged into 1 file to avoid divergence between the files. But it looks like the change in https://github.com/AB-CE/abce/pull/182/files#diff-680cc1ea2a7ed0fde403a4d373d8205dL665 in trade.pyx is undone because only trade.py remains.

There is no unit test for the trade logging, so I can't confirm if #187 fixes the problem or not.

DavoudTaghawiNejad commented 4 years ago

@tony-goss, is the problem fixed in the latest master for you now?

rht commented 3 years ago

The latest master no longer uses Cython, so this bug is no longer relevant.