Skip to content

Conversation

@pseusys
Copy link
Collaborator

@pseusys pseusys commented Jun 2, 2025

I've been running into this issue myself lately.

Here's the error backtrace in case the run is already not available:

Traceback (most recent call last):
  File "/waka-readme-stats/main.py", line 230, in 
    run(main())
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/waka-readme-stats/main.py", line 217, in main
    stats = await get_stats()
            ^^^^^^^^^^^^^^^^^
  File "/waka-readme-stats/main.py", line 197, in get_stats
    stats += f"**{FM.t('Timeline')}**\n\n{GHM.update_chart('Lines of Code', GRAPH_PATH)}"
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/waka-readme-stats/manager_github.py", line 136, in update_chart
    GitHubManager._copy_file_and_add_to_repo(path)
  File "/waka-readme-stats/manager_github.py", line 99, in _copy_file_and_add_to_repo
    GitHubManager.REPO.git.add(dst_path)
  File "/usr/local/lib/python3.11/site-packages/git/cmd.py", line 736, in 
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/git/cmd.py", line 1[31](https://github.com/pseusys/pseusys/actions/runs/15381417845/job/43272763863#step:3:32)6, in _call_process
    return self.execute(call, **exec_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/git/cmd.py", line 1111, in execute
    raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
  cmdline: git add /waka-readme-stats/repo/assets/bar_graph.png
  stderr: 'The following paths are ignored by one of your .gitignore files:
assets
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"'

It happens in case the generated images that will be displayed in the README are ignored by the default repository .gitignore rules (which is the right and intended thing to do).
They should be added ignoring .gitignore, i.e. by force in that case.
I hope this relatively simple fix works :)

@github-actions
Copy link

github-actions bot commented Jun 2, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@pseusys pseusys requested review from anmol098 and ok-coder1 June 2, 2025 09:00
@pseusys pseusys self-assigned this Jun 2, 2025
@pseusys pseusys added the enhancement New feature or request label Jun 2, 2025
Copy link
Collaborator

@ok-coder1 ok-coder1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ok-coder1 ok-coder1 added the python Pull requests that update Python code label Jun 2, 2025
@ok-coder1
Copy link
Collaborator

Now it looks like #553 has to be merged as it updates dependencies (which is why the CI is failing).

@anmol098
Copy link
Owner

anmol098 commented Jun 2, 2025

Should i merge this forcefully to main ?

@ok-coder1
Copy link
Collaborator

Why is the CI still failing?

@ok-coder1
Copy link
Collaborator

Should i merge this forcefully to main ?

First let's try diagnosing the CI and why it's failing.
AFAIK, this bug hasn't been occurring for everyone.

@ok-coder1
Copy link
Collaborator

Looks like we have to create an issue with the PyGithub repository.

@pseusys
Copy link
Collaborator Author

pseusys commented Jun 2, 2025

Do you think that Actions environment is really completely the same in main branch and in PRs?..
Especially, speaking of permissions, rights, etc.

@ok-coder1
Copy link
Collaborator

@anmol098 @pseusys I need your permission to create a Discord server for this project.
So that we can talk instantly.

@pseusys
Copy link
Collaborator Author

pseusys commented Jun 2, 2025

@anmol098 @pseusys I need your permission to create a Discord server for this project. So that we can talk instantly.

You totally have mine.

@ok-coder1
Copy link
Collaborator

@anmol098 @pseusys I need your permission to create a Discord server for this project. So that we can talk instantly.

You totally have mine.

Your username please!

@pseusys
Copy link
Collaborator Author

pseusys commented Jun 2, 2025

@anmol098 @pseusys I need your permission to create a Discord server for this project. So that we can talk instantly.

You totally have mine.

Your username please!

Same as here, also mentioned in my GitHub profile!

@ok-coder1
Copy link
Collaborator

ok-coder1 commented Jun 2, 2025

Uhm. It's not pseusys.
Could you just send me a request (username okcoder1)? @pseusys

@ok-coder1
Copy link
Collaborator

Do you think that Actions environment is really completely the same in main branch and in PRs?.. Especially, speaking of permissions, rights, etc.

Oh. This I didn't expect. I didn't think of that.

Copy link
Owner

@anmol098 anmol098 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Code Review by Dume.ai, on behalf of @anmol098

Hello, this pull request has been reviewed by Dume.ai, the AI executive assistant to @anmol098.

Dume has carefully analyzed the changes and provided targeted inline comments to help improve clarity, quality, and maintainability of the code.

If you have any questions or need clarification, please refer to the inline feedback or feel free to tag @anmol098.

Review performed on 2025-06-09T04:50:48.009Z

Powered by Dume.ai – Your AI executive assistant for engineering workflows.

@ok-coder1 ok-coder1 changed the title Files added into index by **force** Files added into index by force Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants