Troubleshooting
A - Prerequisite:
Run agilab.sh to install and then try to run your xxx-project. Each Agilab API call should be set with verbose mode >= 3. In particular, when debugging with a Dask worker, it will create a file (~/xxx-project_trace.txt) that shows what happened in during the worker build execution.
B - Pycharm Run/Debug configurations:
These scripts are provided to debug your app with the PyCharm IDE, which best matches Agilab troubleshooting.
.
├── _flight_egg_manager.xml
├── _flight_lib_worker.xml
├── _flight_postinstall_worker.xml
├── _flight_preinstall_manager.xml
├── _flight_run.xml
├── _flight_test.xml
├── _my_code_egg_manager.xml
├── _my_code_lib_worker.xml
├── _my_code_postinstall_worker.xml
├── _my_code_preinstall_manager.xml
├── _my_code_run.xml
├── _my_code_test.xml
├── agilab_run.xml
├── app_install.xml
├── app_install__debug_.xml
├── app_script_gen.xml
├── core_test.xml
├── lab_run_test.xml
├── run_ssh_cmd.xml
├── test_agi_env.xml
├── test_agi_manager.xml
├── test_agi_runner.xml
├── test_agi_worker.xml
├── test_dag_worker.xml
├── test_pandas_worker.xml
├── test_polars_worker.xml
├── test_ssh.xml
└── zip_all_gen.xml
1 directory, 28 files
C - Exemple of Tests Sequence:
** zip-all gen**
TGenerate the zip of the whole agi project directory with .gitignore filtration. A agi.zip file should created at the root dir of your projectu
** test-agi-env test**
This will lunch unitary test for agi_env components and display their pytest results
** core test**
This will lunch all the unitary tests for agi_core components and display their pytest results
** app_script gen**
This will generate the script below
** <your app>-preinstall**
This will test the conversion of <your_code>_worker.py into <your_code>_worker.pyx to check if your code is transformable into Cython compilable source code. A file <your_code_worker.pyx> should appear in your wenv
** <your app>-postinstall test**
This will test the test your worker post_install.py.
** app-manager install**
This will install the venv in your fwk/apps/<your app>.
** app install**
This will install the venv in your fwk/apps/<your app> and in your <home>/wenv/<your worker>.
** <your app>_egg gen **
Generate your project egg file containing all the required files to compile the worker Cython library.
** <your app>_lib gen **
Generate your project lib file by compiling <your_code>_worker.pyx and add its dependencies into a Cython library.
** <your app> test**
This will test your app in a minimalistic way.
** <your app> run**
In the contexte of apps/<your app>/.venv it will run the log/AGI.<snippet> you have selected which should only be a distribute or a run one. Remark: use script “app install” to test your app install as it has to be run under fwk/core/.venv virtual environnement.
D - agilab_run vs gui_run:
1. agilab_run
Main script to lunch agilab This will run streamlit module which will run AGILAB.py in run/debug mode
12. gui-run
Only for enabling run_lab.py debugging This will directly lunch run_lab.py in run/debug mode
Known Bugs
<UV> Sync Failed
While running a script you see a “missing module” message but your module is correctly installed in your venv. And when you try to reinstall it his can lead to re-installation failures due to circular dependencies that prevent proper package version resolution. This may arrived because your UV cache has been corrupted.
Solution:
Clean the UV cache by executing the following command:
uv cache clean
<DASK> Debug Issue
While debugging Dask on Python, you might encounter the following error:
TypeError: _patch_asyncio.<locals>.run() got an unexpected keyword argument 'loop_factory'
Workaround:
Disable python.console.asynio.repl in the PyCharm registry. To do this, press <Shift>+<Ctrl>+A to open the action search window and then search for registry.

<PYCHARM> Run/Debug Configuration is Broken
For instance, select your “Run/Debug configuration” (e.g., <gen-docstings>) and then press [Run]. The following message appears when you try to [debug] <gen-docstings>:
Argument for @NotNull parameter ‘module’ of com/intellij/openapi/roots/ModuleRootManager.getInstance must not be null

Solution:
This is because your Pycharm script is pointing an a venv but the project containing this venv is not attach to your current project. So you have to attach this project to your currrent project for enabling your script to be runnable again.