Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error in topo.sheet.optimized.NeighborhoodMask_Opt() #676

Open
kalok87 opened this issue Dec 24, 2017 · 4 comments
Open

An error in topo.sheet.optimized.NeighborhoodMask_Opt() #676

kalok87 opened this issue Dec 24, 2017 · 4 comments

Comments

@kalok87
Copy link

kalok87 commented Dec 24, 2017

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.

@jbednar
Copy link
Member

jbednar commented Dec 24, 2017

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).

@jbednar
Copy link
Member

jbednar commented Dec 24, 2017

You can do help(topo.sheet.optimized.NeighborhoodMask_Opt) for more information.

@kalok87
Copy link
Author

kalok87 commented Dec 24, 2017

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?

@jbednar
Copy link
Member

jbednar commented Jan 4, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants