aimclub / aimclub/OSA

bug: cannot access local variable 'dg' where it is not associated with a value

Open
#285 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
143
Forks
23
Avg merge
5d 9h
Merged PRs (30d)
2

Description

## Description

repository - https://github.com/sphinx-doc/sphinx

run command -

``` python
cmd = [
"poetry",
"run",
"osa-tool",
"-r",
" https://github.com/sphinx-doc/sphinx",
"--api",
"openai",
"--base-url",
"https://openrouter.ai/api/v1",
"--model",
"gpt-4.1",
"--no-fork",
"--no-pull-request",
"-m",
"basic",
"--web-mode"
]
```

`sheduler.py` was modified to include only docstring generation for basic mode:

```python
@staticmethod
def _basic_plan() -> dict:
"""Return default plan for 'basic' mode."""
plan = {
"docstring": True,
}
return plan
```

## Logs

```txt
[02:25:33] INFO [02:25:33] - Created directory: /home/ilya/OSA/popular_2__OSA_gpt4_1 run.py:64
INFO [02:25:33] - Output path changed to /home/ilya/OSA/popular_2__OSA_gpt4_1 run.py:66
INFO [02:25:33] - Config successfully updated and loaded run.py:335
[02:25:34] INFO [02:25:34] - Successfully fetched GitHub metadata for repository: 'sphinx-doc/sphinx' metadata.py:255
INFO [02:25:34] - Cloning the 'master' branch from https://github.com/sphinx-doc/sphinx into directory git_agent.py:344
/home/ilya/OSA/popular_2__OSA_gpt4_1/sphinx...
[02:25:47] INFO [02:25:47] - Cloning completed git_agent.py:353
INFO [02:25:47] - Basic mode selected for task scheduler. scheduler.py:56
INFO [02:25:47] - Web mode enabled, returning plan for web interface. scheduler.py:88

────────────────────────────────────────────────────────────────────────── Docstrings generation ───────────────────────────────────────────────────────────────────────────
[02:25:48] ERROR [02:25:48] - Error: cannot access local variable 'dg' where it is not associated with a value run.py:179
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.