Error: Request failed with status code 403
Anytime I've tried to use autodocstring in VS Code, it generates a docstring with arguments, inserts it, successfully inserts the docstring the produces and error code 403.
Versions (please complete the following information):
- autoDocstring Version: v0.1.3
- Operating System: Mac OS 14.1 (23B74)
- Vscode Version: 1.84.1 (Universal)
Original Code (with line to generate on):
class TableOfContents(BaseModel):
"""Super Gene's Table of Contents."""
chapters: List[TocChapter] = []
def __init__(
self,
html: Path = TOC_HTML_PATH,
save: bool = True,
verbose: bool = False) -> None:
"""${cursor}"""
Expected Result:
class TableOfContents(BaseModel):
"""Super Gene's Table of Contents."""
chapters: List[TocChapter] = []
def __init__(
self,
html: Path = TOC_HTML_PATH,
save: bool = True,
verbose: bool = False) -> None:
"""The table of contents.
Args:
html (Path, optional): The path to the table of contents html file. Defaults to
TOC_HTML_PATH.
save (bool, optional): Whether to save the table of contents to disk after initializing
it. Defaults to True.
verbose (bool, optional): Whether to print logging messages to the console. Defaults
to False.
"""
Actual Result:
class TableOfContents(BaseModel):
"""Super Gene's Table of Contents."""
chapters: List[TocChapter] = []
def __init__(
self,
html: Path = TOC_HTML_PATH,
save: bool = True,
verbose: bool = False) -> None:
"""AI is creating summary for __init__
Args:
html (Path, optional): [description]. Defaults to TOC_HTML_PATH.
save (bool, optional): [description]. Defaults to True.
verbose (bool, optional): [description]. Defaults to False.
"""
Stack trace:
If an error was reported by autodocstring please copy the stack trace from the autoDocstring
output channel.
[INFO 07:09:30.485] ai-docstring was activated
[INFO 09:38:20.492] Generating Docstring at line: 124
[INFO 09:38:20.496] Docstring generated:
"""${1:AI is creating summary for parse_dict}
Args:
arg (${2:dict[str, int}): ${3:[description]}
verbose (${4:bool}, optional): ${5:[description]}. Defaults to False.
Raises:
TypeError: ${6:[description]}
ValueError: ${7:[description]}
ValueError: ${8:[description]}
ValueError: ${9:[description]}
Returns:
${10:[type]}: ${11:[description]}
"""
[INFO 09:38:20.496] Inserting at position: 124 0
[INFO 09:38:20.503] Successfully inserted docstring
[ERROR 09:38:20.510] Error: Request failed with status code 403
[INFO 11:58:35.684] Generating Docstring at line: 225
[INFO 11:58:35.688] Docstring generated:
"""${1:AI is creating summary for __init__}
Args:
html (${2:Path}, optional): ${3:[description]}. Defaults to TOC_HTML_PATH.
save (${4:bool}, optional): ${5:[description]}. Defaults to True.
verbose (${6:bool}, optional): ${7:[description]}. Defaults to False.
"""
[INFO 11:58:35.688] Inserting at position: 225 0
[INFO 11:58:35.735] Successfully inserted docstring
[ERROR 11:58:35.741] Error: Request failed with status code 403
Additional context
Add any other context about the problem here.