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

Stacktrace: Traceback (most recent call last): #65

Closed
Acetyld opened this issue Oct 19, 2023 · 4 comments · Fixed by #66
Closed

Stacktrace: Traceback (most recent call last): #65

Acetyld opened this issue Oct 19, 2023 · 4 comments · Fixed by #66

Comments

@Acetyld
Copy link

Acetyld commented Oct 19, 2023

Hi as title states:

readmeai -o=README.md --repository=https://github.com/Acetyld/expo-foreground-actions

ERROR Exception: list index out of range Stacktrace: Traceback (most recent call last): File "/opt/homebrew/lib/python3.11/site-packages/readmeai/main.py", line 81, in readme_agent dependencies, file_text = parser.get_dependencies(temp_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/readmeai/core/preprocess.py", line 107, in get_dependencies dependencies = self.get_dependency_file_contents(contents) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/readmeai/core/preprocess.py", line 64, in get_dependency_file_contents parsed_content = parser(content=content["content"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/readmeai/core/parser.py", line 254, in parse_gradle return [ ^ File "/opt/homebrew/lib/python3.11/site-packages/readmeai/core/parser.py", line 255, in <listcomp> match.split(":")[-2].split(".")[-1] ~~~~~~~~~~~~~~~~^^^^ IndexError: list index out of range

@eli64s eli64s linked a pull request Oct 20, 2023 that will close this issue
@eli64s eli64s closed this as completed in ec3df5b Oct 20, 2023
@eli64s
Copy link
Owner

eli64s commented Oct 20, 2023

Hi @Acetyld,

I've pushed an update to correct this error. Please install the latest version:

pip install readmeai --upgrade

Let me know if you're still facing issues. Thank you.

Eli

@Acetyld
Copy link
Author

Acetyld commented Oct 20, 2023

Hi @Acetyld,

I've pushed an update to correct this error. Please install the latest version:

pip install readmeai --upgrade

Let me know if you're still facing issues. Thank you.

Eli

Seems to be fixed =)!

But.. same prompt now gives:

[(PosixPath('yarn.lock'), 'Prompt exceeds max token limit: 12885.'), (PosixPath('.eslintrc.js'), 'HTTPStatus Exception: 401'), (PosixPath('plugins/expo-foreground-actions.js'), 'HTTPStatus Exception: 401'), (PosixPath('example/App.tsx'), 'HTTPStatus Exception: 401'), (PosixPath('example/webpack.config.js'), 'HTTPStatus Exception: 401')]

ERROR HTTPStatus Exception:
Client error '401 Unauthorized' for url 'https://api.openai.com/v1/chat/completions'
For more information check: https://httpstatuses.com/401
ERROR HTTPStatus Exception:

@nachimehta
Copy link

nachimehta commented Oct 22, 2023

@eli64s I am getting the original error with the following command

readmeai -k REDACTED -m gpt-3.5-turbo -r local-dir -o readme-ai.md

Stacktrace: Traceback (most recent call last):
  File "/home/nachi/projects/venv/lib/python3.10/site-packages/readmeai/main.py", line 115, in readme_agent
    headers.build_readme_md(conf, conf_helper, dependencies, code_summary)
  File "/home/nachi/projects/venv/lib/python3.10/site-packages/readmeai/markdown/headers.py", line 24, in build_readme_md
    all_readme_sections = format_readme_md_contents(
  File "/home/nachi/projects/venv/lib/python3.10/site-packages/readmeai/markdown/headers.py", line 51, in format_readme_md_contents
    conf.md.tables = tables.create_tables(
  File "/home/nachi/projects/venv/lib/python3.10/site-packages/readmeai/markdown/tables.py", line 48, in create_tables
    table = create_table(table_data, repository, user_repo_name)
  File "/home/nachi/projects/venv/lib/python3.10/site-packages/readmeai/markdown/tables.py", line 66, in create_table
    github_url = vcs.get_github_file_link(
  File "/home/nachi/projects/venv/lib/python3.10/site-packages/readmeai/services/version_control.py", line 127, in get_github_file_link
    domain = repo.split("/")[2]
IndexError: list index out of range

@eli64s
Copy link
Owner

eli64s commented Oct 22, 2023

@nachimehta Just pushed an update. Download the latest version using:

pip install --upgrade readmeai

Ley me know if you face anymore issues!

Thank you,
Eli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants