Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Request failed with status code 403 #13

Open
maxludden opened this issue Nov 9, 2023 · 3 comments
Open

Error: Request failed with status code 403 #13

maxludden opened this issue Nov 9, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@maxludden
Copy link

maxludden commented Nov 9, 2023

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.

@maxludden maxludden added the bug Something isn't working label Nov 9, 2023
@lulunac27a
Copy link

I get only AI is creating summary for ${class} output where ${class} is the name of the class when I generate docstring in Python.

@eric-easyhealth
Copy link

same issue, is this repo still actively supporting by someone?

@bsassoli
Copy link

bsassoli commented Aug 4, 2024

I have the same issue as @lulunac27a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants