pharmpy / pharmr

R wrapper to Pharmpy
GNU Lesser General Public License v3.0
19 stars 4 forks source link

symbol V is not defined - IIV search #168

Open artikandms opened 5 months ago

artikandms commented 5 months ago

Hi again. I updated pharmr to 0.109, so I’ll go over the main functions again. By using the same input model, dataset and code I used in version 0.108, I get this error message. My input model is a model created by modelsearch. Do you know why that happens?

res <- run_iivsearch(algorithm='top_down_exhaustive',
                     model=structuralmodel,
                     results=structuralmodelresults,
                     iiv_strategy='fullblock',
                     rank_type='ofv',
                     cutoff= NULL,
                     keep = NULL,
                     strictness = "minimization_successful and rse < 0.5",
                     correlation_algorithm = 'skip')
2024-04-29 11:43:29,315 - distributed.worker - WARNING - Compute Failed
Key:       candidate_entry-run7-40c457a9-3c9f-4edd-b18a-735e78e14ca6
Function:  execute_task
args:      ((<function retrieve_from_database_or_execute_model_with_tool.<locals>.task at 0x7f021268c720>, <pharmpy.workflows.tool_database.local_directory.LocalDirectoryToolDatabase object at 0x7f0211d09df0>, (<function create_no_of_etas_candidate_entry at 0x7f0211e325c0>, 'iivsearch_run8', ('ETA_2', 'ETA_3'), False, None, <pharmpy.workflows.model_entry.ModelEntry object at 0x7f02119bbf20>)))
kwargs:    {}
Exception: "ValueError('Symbol V is not defined')"

2024-04-29 11:43:29,327 - distributed.worker - WARNING - Compute Failed
Key:       candidate_entry-run13-d4bbc864-178b-4533-98f9-70bdc29e7e39
Function:  execute_task
args:      ((<function retrieve_from_database_or_execute_model_with_tool.<locals>.task at 0x7f021268c720>, <pharmpy.workflows.tool_database.local_directory.LocalDirectoryToolDatabase object at 0x7f0211d09df0>, (<function create_no_of_etas_candidate_entry at 0x7f0211e325c0>, 'iivsearch_run14', ('ETA_2', 'ETA_3', 'ETA_MDT'), False, None, <pharmpy.workflows.model_entry.ModelEntry object at 0x7f02119bbf20>)))
kwargs:    {}
Exception: "ValueError('Symbol V is not defined')"

2024-04-29 11:43:29,327 - distributed.worker - WARNING - Compute Failed
Key:       candidate_entry-run10-545f5520-8026-4a94-9e49-bc28bb6d93e1
Function:  execute_task
args:      ((<function retrieve_from_database_or_execute_model_with_tool.<locals>.task at 0x7f021268c720>, <pharmpy.workflows.tool_database.local_directory.LocalDirectoryToolDatabase object at 0x7f0211d09df0>, (<function create_no_of_etas_candidate_entry at 0x7f0211e325c0>, 'iivsearch_run11', ('ETA_1', 'ETA_2', 'ETA_3'), False, None, <pharmpy.workflows.model_entry.ModelEntry object at 0x7f02119bbf20>)))
kwargs:    {}
Exception: "ValueError('Symbol V is not defined')"

2024-04-29 11:43:29,328 - distributed.worker - WARNING - Compute Failed
Key:       candidate_entry-run4-7401ee87-5c75-4a5a-931f-4655c8e8e574
Function:  execute_task
args:      ((<function retrieve_from_database_or_execute_model_with_tool.<locals>.task at 0x7f021268c720>, <pharmpy.workflows.tool_database.local_directory.LocalDirectoryToolDatabase object at 0x7f0211d09df0>, (<function create_no_of_etas_candidate_entry at 0x7f0211e325c0>, 'iivsearch_run5', ('ETA_1', 'ETA_2'), False, None, <pharmpy.workflows.model_entry.ModelEntry object at 0x7f02119bbf20>)))
kwargs:    {}
Exception: "ValueError('Symbol V is not defined')"

2024-04-29 11:43:29,328 - distributed.worker - WARNING - Compute Failed
Key:       start_iiv-results
Function:  execute_task
args:      ((<function _results at 0x7f021204f420>, (<function start at 0x7f021204e3e0>, <pharmpy.workflows.tool_database.local_directory.LocalDirectoryToolDatabase object at 0x7f0211d09df0>, <Pharmpy model object modelsearch_run3>, <Pharmpy modelfit results object modelsearch_run3>, 'top_down_exhaustive', 'skip', 'fullblock', 'ofv', None, None, 'minimization_successful and rse < 0.5')))
kwargs:    {}
Exception: "ValueError('Symbol V is not defined')"

<Client: 'inproc://7.19.207.251/24677/10' processes=1 threads=24, memory=62.78 GiB>
2024-04-29 11:43:29,335 - distributed.worker - WARNING - Compute Failed
Key:       candidate_entry-run8-7751e03b-bbd4-43b6-9aa3-24e6a3f04fd4
Function:  execute_task
args:      ((<function retrieve_from_database_or_execute_model_with_tool.<locals>.task at 0x7f021268c720>, <pharmpy.workflows.tool_database.local_directory.LocalDirectoryToolDatabase object at 0x7f0211d09df0>, (<function create_no_of_etas_candidate_entry at 0x7f0211e325c0>, 'iivsearch_run9', ('ETA_2', 'ETA_MDT'), False, None, <pharmpy.workflows.model_entry.ModelEntry object at 0x7f02119bbf20>)))
kwargs:    {}
Exception: "ValueError('Symbol V is not defined')"

2024-04-29 11:43:29,335 - distributed.worker - WARNING - Compute Failed
Key:       candidate_entry-run1-e30597d6-9b1d-4e73-b14b-c9cf2505c923
Function:  execute_task
args:      ((<function retrieve_from_database_or_execute_model_with_tool.<locals>.task at 0x7f021268c720>, <pharmpy.workflows.tool_database.local_directory.LocalDirectoryToolDatabase object at 0x7f0211d09df0>, (<function create_no_of_etas_candidate_entry at 0x7f0211e325c0>, 'iivsearch_run2', ('ETA_2',), False, None, <pharmpy.workflows.model_entry.ModelEntry object at 0x7f02119bbf20>)))
kwargs:    {}
Exception: "ValueError('Symbol V is not defined')"

2024-04-29 11:43:29,336 - distributed.worker - WARNING - Compute Failed
Key:       candidate_entry-run11-f7fd72de-c7d5-4795-8f7c-ac263d074797
Function:  execute_task
args:      ((<function retrieve_from_database_or_execute_model_with_tool.<locals>.task at 0x7f021268c720>, <pharmpy.workflows.tool_database.local_directory.LocalDirectoryToolDatabase object at 0x7f0211d09df0>, (<function create_no_of_etas_candidate_entry at 0x7f0211e325c0>, 'iivsearch_run12', ('ETA_1', 'ETA_2', 'ETA_MDT'), False, None, <pharmpy.workflows.model_entry.ModelEntry object at 0x7f02119bbf20>)))
kwargs:    {}
Exception: "ValueError('Symbol V is not defined')"

2024-04-29 11:43:29,349 - distributed.worker.state_machine - WARNING - Async instruction for <Task cancelled name="execute('candidate_entry-run9-aa9e6860-9b8c-480e-a5a5-692481dc7253')" coro=<Worker.execute() done, defined at /homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/worker_state_machine.py:3615>> ended with CancelledError
2024-04-29 11:43:29,349 - distributed.worker.state_machine - WARNING - Async instruction for <Task cancelled name="execute('candidate_entry-run5-22d08a07-2ca3-48a5-af77-a07451dc3f7c')" coro=<Worker.execute() done, defined at /homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/worker_state_machine.py:3615>> ended with CancelledError
2024-04-29 11:43:29,349 - distributed.worker.state_machine - WARNING - Async instruction for <Task cancelled name="execute('candidate_entry-run0-0b8e6e94-24e1-46bf-833a-5616b0308658')" coro=<Worker.execute() done, defined at /homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/worker_state_machine.py:3615>> ended with CancelledError
2024-04-29 11:43:29,350 - distributed.worker.state_machine - WARNING - Async instruction for <Task cancelled name="execute('candidate_entry-run14-ceb64ed0-a727-45fb-b419-5e76048988de')" coro=<Worker.execute() done, defined at /homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/worker_state_machine.py:3615>> ended with CancelledError
2024-04-29 11:43:29,350 - distributed.worker.state_machine - WARNING - Async instruction for <Task cancelled name="execute('candidate_entry-run3-3a0f255d-ef85-431e-8b1e-2d3f1f3c0906')" coro=<Worker.execute() done, defined at /homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/worker_state_machine.py:3615>> ended with CancelledError
2024-04-29 11:43:29,350 - distributed.worker.state_machine - WARNING - Async instruction for <Task cancelled name="execute('candidate_entry-run2-8fbdad46-3a3b-4474-845a-adbb91fb6d62')" coro=<Worker.execute() done, defined at /homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/worker_state_machine.py:3615>> ended with CancelledError
2024-04-29 11:43:29,350 - distributed.worker.state_machine - WARNING - Async instruction for <Task cancelled name="execute('candidate_entry-run12-6bdf6870-4b49-449c-99c9-8c27146a0d66')" coro=<Worker.execute() done, defined at /homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/worker_state_machine.py:3615>> ended with CancelledError
2024-04-29 11:43:29,350 - distributed.worker.state_machine - WARNING - Async instruction for <Task cancelled name="execute('candidate_entry-run6-157a2539-87c1-4f4f-9789-9e23d5ef01a3')" coro=<Worker.execute() done, defined at /homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/worker_state_machine.py:3615>> ended with CancelledError
ValueError: Symbol V is not defined
Run `reticulate::py_last_error()` for details.Full stack:
ValueErrorSymbol V is not definedc("  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/wrap.py\", line 34, in func\n    return run_tool(tool_name, *args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/run.py\", line 169, in run_tool\n    return run_tool_with_name(name, tool, args, kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/run.py\", line 207, in run_tool_with_name\n    res = execute_workflow(wf, dispatcher=dispatcher, database=tool_database)\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", 
"  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/workflows/execute.py\", line 73, in execute_workflow\n    res: T = dispatcher.run(workflow)\n             ^^^^^^^^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/workflows/dispatchers/local_dask.py\", line 84, in run\n    res = client.get(dsk_optimized, 'results')\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/client.py\", line 3275, in get\n    results = self.gather(packed, asynchronous=asynchronous, direct=direct)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", 
"  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/client.py\", line 2372, in gather\n    return self.sync(\n           ^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/iivsearch/tool.py\", line 247, in start\n    res = call_workflow(wf, f'results_{algorithm}', context)\n    ^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/workflows/call.py\", line 42, in call_workflow\n    res: T = client.gather(futures)  # pyright: ignore [reportGeneralTypeIssues]\n      ^^^^^^^^^^^^^^^^^\n", 
"  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/iivsearch/algorithms.py\", line 227, in create_no_of_etas_candidate_entry\n    name=name, description=create_description(candidate_model)\n    ^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/iivsearch/algorithms.py\", line 290, in create_description\n    param_dict = _create_param_dict(model, dists)\n      ^^^^^^^^^^^^^^^^^\n", 
"  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/iivsearch/algorithms.py\", line 280, in _create_param_dict\n    param_dict[eta] = get_rv_parameters(model, eta)[0]\n    ^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/modeling/expressions.py\", line 1152, in get_rv_parameters\n    ind_param = get_individual_parameters(model, level=\"random\")\n      ^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/modeling/expressions.py\", line 773, in get_individual_parameters\n    model = _replace_trivial_redefinitions(model)\n      ^^^^^^^^^^^^^^^^^\n", 
"  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/modeling/expressions.py\", line 982, in _replace_trivial_redefinitions\n    return model.replace(statements=new)\n      ^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/model/model.py\", line 380, in replace\n    statements = Model._canonicalize_statements(\n    ^^^^^^^^^^^^^^^^^\n", "  File \"/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/model/model.py\", line 241, in _canonicalize_statements\n    raise ValueError(f'Symbol {symb} is not defined')\n    ^^^^^^^^^^^^^^^^^\n"
)Traceback (most recent call last):
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/wrap.py", line 34, in func
    return run_tool(tool_name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/run.py", line 169, in run_tool
    return run_tool_with_name(name, tool, args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/run.py", line 207, in run_tool_with_name
    res = execute_workflow(wf, dispatcher=dispatcher, database=tool_database)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/workflows/execute.py", line 73, in execute_workflow
    res: T = dispatcher.run(workflow)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/workflows/dispatchers/local_dask.py", line 84, in run
    res = client.get(dsk_optimized, 'results')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/client.py", line 3275, in get
    results = self.gather(packed, asynchronous=asynchronous, direct=direct)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/distributed/client.py", line 2372, in gather
    return self.sync(
           ^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/iivsearch/tool.py", line 247, in start
    res = call_workflow(wf, f'results_{algorithm}', context)
    ^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/workflows/call.py", line 42, in call_workflow
    res: T = client.gather(futures)  # pyright: ignore [reportGeneralTypeIssues]
      ^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/iivsearch/algorithms.py", line 227, in create_no_of_etas_candidate_entry
    name=name, description=create_description(candidate_model)
    ^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/iivsearch/algorithms.py", line 290, in create_description
    param_dict = _create_param_dict(model, dists)
      ^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/tools/iivsearch/algorithms.py", line 280, in _create_param_dict
    param_dict[eta] = get_rv_parameters(model, eta)[0]
    ^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/modeling/expressions.py", line 1152, in get_rv_parameters
    ind_param = get_individual_parameters(model, level="random")
      ^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/modeling/expressions.py", line 773, in get_individual_parameters
    model = _replace_trivial_redefinitions(model)
      ^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/modeling/expressions.py", line 982, in _replace_trivial_redefinitions
    return model.replace(statements=new)
      ^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/model/model.py", line 380, in replace
    statements = Model._canonicalize_statements(
    ^^^^^^^^^^^^^^^^^
  File "/homemtp/u1029377/miniconda3/envs/r-reticulate/lib/python3.12/site-packages/pharmpy/model/model.py", line 241, in _canonicalize_statements
    raise ValueError(f'Symbol {symb} is not defined')
    ^^^^^^^^^^^^^^^^^
ValueError: Symbol V is not defined
py_call_impl(callable, call_args$unnamed, call_args$named)c("python.builtin.ValueError", "python.builtin.Exception", "python.builtin.BaseException", "python.builtin.object", "error", "condition")list(call = list(run_iivsearch(algorithm = "top_down_exhaustive", model = structuralmodel, results = structuralmodelresults, iiv_strategy = "fullblock", rank_type = "ofv", cutoff = NULL, keep = NULL, strictness = "minimization_successful and rse < 0.5", correlation_algorithm = "skip"), tryCatch({
    func_out <- pharmpy$tools$run_iivsearch(algorithm = algorithm, iiv_strategy = iiv_strategy, rank_type = rank_type, cutoff = cutoff, results = results, model = model, keep = keep, strictness = strictness, correlation_algorithm = correlation_algorithm, ...)
    if ("pharmpy.model.results.Results" %in% class(func_out)) {
        func_out <- reset_indices_results(func_out)
    }
    return(py_to_r(func_out))
}, error = function(cond) {
    message(cond)
    message("Full stack:")
    message(reticulate::py_last_error())
    message("pharmr version: ", packageVersion("pharmr"))
    message("Pharmpy version: ", print_pharmpy_version())
    return(NA)
}, warning = function(cond) {
    message(cond)
    message("Full stack:")
    message(reticulate::py_last_error())
    message("pharmr version: ", packageVersion("pharmr"))
    message("Pharmpy version: ", print_pharmpy_version())
    return(NA)
}), tryCatchList(expr, classes, parentenv, handlers), tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]), doTryCatch(return(expr), name, parentenv, handler), tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), tryCatchOne(expr, names, parentenv, handlers[[1]]), doTryCatch(return(expr), name, parentenv, handler), pharmpy$tools$run_iivsearch(algorithm = algorithm, iiv_strategy = iiv_strategy, rank_type = rank_type, cutoff = cutoff, results = results, 
    model = model, keep = keep, strictness = strictness, correlation_algorithm = correlation_algorithm, ...), py_call_impl(callable, call_args$unnamed, call_args$named)), parent = c(0, 1, 2, 3, 4, 3, 6, 7, 1, 9), visible = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), namespace = c("pharmr", "base", "base", "base", "base", "base", "base", "base", NA, "reticulate"), scope = c("::", "::", "local", "local", "local", "local", "local", "local", NA, ":::"), full_call = list(run_iivsearch(algorithm = "top_down_exhaustive", 
    model = structuralmodel, results = structuralmodelresults, iiv_strategy = "fullblock", rank_type = "ofv", cutoff = NULL, keep = NULL, strictness = "minimization_successful and rse < 0.5", correlation_algorithm = "skip"), tryCatch({
    func_out <- pharmpy$tools$run_iivsearch(algorithm = algorithm, iiv_strategy = iiv_strategy, rank_type = rank_type, cutoff = cutoff, results = results, model = model, keep = keep, strictness = strictness, correlation_algorithm = correlation_algorithm, ...)
    if ("pharmpy.model.results.Results" %in% class(func_out)) {
        func_out <- reset_indices_results(func_out)
    }
    return(py_to_r(func_out))
}, error = function(cond) {
    message(cond)
    message("Full stack:")
    message(reticulate::py_last_error())
    message("pharmr version: ", packageVersion("pharmr"))
    message("Pharmpy version: ", print_pharmpy_version())
    return(NA)
}, warning = function(cond) {
    message(cond)
    message("Full stack:")
    message(reticulate::py_last_error())
    message("pharmr version: ", packageVersion("pharmr"))
    message("Pharmpy version: ", print_pharmpy_version())
    return(NA)
}), tryCatchList(expr, classes, parentenv, handlers), tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]), doTryCatch(return(expr), name, parentenv, handler), tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), tryCatchOne(expr, names, parentenv, handlers[[1]]), doTryCatch(return(expr), name, parentenv, handler), pharmpy$tools$run_iivsearch(algorithm = algorithm, iiv_strategy = iiv_strategy, rank_type = rank_type, cutoff = cutoff, results = results, 
    model = model, keep = keep, strictness = strictness, correlation_algorithm = correlation_algorithm, ...), py_call_impl(callable, call_args$unnamed, call_args$named)))
pharmr version: 0.109.0
'0.109.0'
Pharmpy version: 0.109.0
stellabelin commented 5 months ago

Hi! If you write get_individual_parameters(structuralmodel), do you get the same error?

artikandms commented 5 months ago

No, this is what I got :

image