question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing required positional argument: 'configured_N'

See original GitHub issue

After having updated the predator/prey model from the demos folder for cadCAD 0.4.18, I’m getting the following error. Does this error look familiar? I’m sure there’s some more context I could give, I’ll update this issue if I find it.

Execution Mode: local_proc
Configuration Count: 1
Dimensions of the first simulation: (Timesteps, Params, Runs, Vars) = (1000, 6, 1, 2)
Execution Method: local_simulations

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-1fa93129baf3> in <module>
      2 # Tweak the prey_predator_abm/sim_params.py file if you want it to take longer (or not).
      3 start_time = time()
----> 4 experiments = run.run()
      5 end_time = time()
      6 print("Execution in {:.1f}s".format(end_time - start_time))

~/workspace/cadCAD/demos/prey-predator/run.py in run(drop_midsteps)
     22     results = pd.DataFrame()
     23     i = 0
---> 24     for raw_result, _tensor_field, _sessions in run.execute():
     25         params = configs[i].sim_config['M']
     26         result_record = pd.DataFrame.from_records([tuple([i for i in params.values()])], columns=list(params.keys()))

~/Library/Caches/pypoetry/virtualenvs/demos-KUP5ZvRJ-py3.8/lib/python3.8/site-packages/cadCAD/engine/__init__.py in execute(self)
    149 
    150             print("Execution Method: " + self.exec_method.__name__)
--> 151             simulations_results = self.exec_method(
    152                 sim_executors, var_dict_list, states_lists, configs_structs, env_processes_list, Ts, SimIDs, RunIDs,
    153                 ExpIDs, SubsetIDs, SubsetWindows, original_N

~/Library/Caches/pypoetry/virtualenvs/demos-KUP5ZvRJ-py3.8/lib/python3.8/site-packages/cadCAD/engine/execution.py in local_simulations(simulation_execs, var_dict_list, states_lists, configs_structs, env_processes_list, Ts, SimIDs, Ns, ExpIDs, SubsetIDs, SubsetWindows, exec_method)
    138     try:
    139         if len(configs_structs) == 1:
--> 140             return single_proc_exec(
    141                 simulation_execs, var_dict_list, states_lists, configs_structs, env_processes_list, Ts, SimIDs, Ns,
    142                 ExpIDs, SubsetIDs, SubsetWindows, exec_method

~/Library/Caches/pypoetry/virtualenvs/demos-KUP5ZvRJ-py3.8/lib/python3.8/site-packages/cadCAD/engine/execution.py in single_proc_exec(simulation_execs, var_dict_list, states_lists, configs_structs, env_processes_list, Ts, SimIDs, Ns, ExpIDs, SubsetIDs, SubsetWindows, exec_method)
     34         map(lambda x: x.pop(), params)
     35     )
---> 36     result = simulation_exec(var_dict_list, states_list, config, env_processes, T, sim_id, N, subset_id, subset_window)
     37     return flatten(result)
     38 

TypeError: simulation() missing 1 required positional argument: 'configured_N'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
JEJodestycommented, Aug 17, 2020

@BenSchZA Good catch fixed this in during development the beginning of this week will merge a fix for this today

0reactions
JEJodestycommented, Aug 20, 2020

Hot fix #183

Read more comments on GitHub >

github_iconTop Results From Across the Web

pack_configure() missing 1 required positional argument: 'self'
It seems that you are calling an instance method without an active instance: Label.pack(). It is only possible for methods that are callable...
Read more >
I2C Missing required positional arguments #151 - eblot/pyftdi
Hello,. I'm probably missing something simple but when I try the example code I'm getting missing positional arguments errors.
Read more >
Python missing 1 required positional argument: 'self' Solution
The “missing 1 required positional argument: 'self'” error is raised when you do not instantiate an object of a class before calling a...
Read more >
Troubleshoot -missing 1 required positional argument
This video describes about Python functionLink for Python Introduction and Python interpreter installation :https://youtu.be/Xd58Ij_rUUkLink ...
Read more >
How to fix- TypeError: xpath() missing 1 required positional ...
Here in this video, you will see the reason of the error and fix How to fix- TypeError: xpath() missing 1 required positional...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found