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

Issue when building agents #202

Open CaleHarr opened 4 years ago

CaleHarr commented 4 years ago

Hi Davoud, Thanks for writing such an innovative package. I'm having an issue when trying to run the 'one household one firm with logic' example, specifically with the line: firms = simulation.build_agents(Firm, 'firm', 1) This may be a noob issue in which case apologies, but it's not letting me create a firm and stating 'TypeError: Firm() takes no arguments'. The same happens when I switch the lines to put household first. Please let me know if there's any further info I can provide to help with diagnostics,

Thanks, Cale

DavoudTaghawiNejad commented 4 years ago

Please send me your firm class, there must be the culprit.

On Sun, 14 Jun 2020, 22:48 CaleCornelius, notifications@github.com wrote:

Hi Davoud, Thanks for writing such an innovative package. I'm having an issue when trying to run the 'one household one firm with logic' example, specifically with the line: firms = simulation.build_agents(Firm, 'firm', 1) This may be a noob issue in which case apologies, but it's not letting me create a firm and stating 'TypeError: Firm() takes no arguments'. The same happens when I switch the lines to put household first. Please let me know if there's any further info I can provide to help with diagnostics,

Thanks, Cale

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AB-CE/abce/issues/202, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUVZN7US322SHNNZR2HTTRWULPHANCNFSM4N5SGHWQ .

rht commented 4 years ago

Maybe @CaleCornelius was referring to the code in https://github.com/AB-CE/examples/tree/master/examples/one_household_one_firm_with_logic verbatim. However, I can't test this in latest abcEconomics due to the change in flexx API. See #203.

CaleHarr commented 4 years ago

Hi Both, Can confirm I was attempting to run that example verbatim, but I then modified the build agent line to attempt to input the number directly in case that was tripping it over. I'm using Spyder as my IDE in case that's material.

Thanks, Cale

rht commented 4 years ago

@CaleCornelius how did you install abcEconomics? From pip? From this github repo? From the requirements.txt of the examples repo? What version is it on?