Open kalok87 opened 6 years ago
That error indicates that you aren't instantiating it with the correct argument. NeighborhoodMask_Opt inherits its constructor from NeighborhoodMask, which requires a "sheet" argument (topo.sim.V1 or similar).
You can do help(topo.sheet.optimized.NeighborhoodMask_Opt)
for more information.
Dear Prof. Bednar. The situation is like this. I was running gcal.ty in gui mode for 2000 rounds, and then I saved the script at somewhere else, this was running flawlessly. In the second time, I loaded the saved script in topopgrahica and then this error appears. How should I set up the arguments?
Ah, sounds like the script that's generated doesn't contain all the details necessary to reconstruct this particular network. In this case, you'd probably need to hand-edit the generated .ty file to supply the missing information, which in this case is probably an argument of topo.sim.V1. However, if this mask is being defined within topo.sim.V1's constructor, that could get tricky, as topo.sim.V1 won't exist yet. It's hard to see without the .ty file involved.
topo.sheet.optimized.NeighborhoodMask_Opt()
TypeError: init() takes exactly 2 arguments (1 given)
The reason for this error is that the init is missing in the codes of NeighborhoodMask_Opt.