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

Sweep: It looks like an issue has occurred around fetching the files #3167

Open
2 tasks done
nas-maker opened this issue Feb 26, 2024 · 1 comment
Open
2 tasks done
Labels
sweep Assigns Sweep to an issue or pull request.

Comments

@nas-maker
Copy link

nas-maker commented Feb 26, 2024

i get this error : Traceback (most recent call last):
webhook | File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
webhook | self.run()
webhook | File "/usr/local/lib/python3.10/threading.py", line 953, in run
webhook | self._target(*self._args, **self._kwargs)
webhook | File "/app/sweepai/api.py", line 145, in run_on_ticket
webhook | return on_ticket(*args, **kwargs, tracking_id=tracking_id)
webhook | File "/app/sweepai/handlers/on_ticket.py", line 1595, in on_ticket
webhook | raise e
webhook | File "/app/sweepai/handlers/on_ticket.py", line 726, in on_ticket
webhook | raise Exception("Failed to fetch files")
self hosting

Checklist
  • Modify sweepai/handlers/on_ticket.py ! No changes made Edit
  • Running GitHub Actions for sweepai/handlers/on_ticket.pyEdit
@nas-maker nas-maker added the sweep Assigns Sweep to an issue or pull request. label Feb 26, 2024
@MartinYe1234
Copy link
Collaborator

MartinYe1234 commented Mar 13, 2024

Sweeping

50%


Actions (click)

  • ↻ Restart Sweep

❌ Unable to Complete PR

I'm sorry, but it looks like an error has occurred due to a planning failure. Feel free to add more details to the issue description so Sweep can better address it. Alternatively, reach out to Kevin or William for help at https://discord.gg/sweep.

For bonus GPT-4 tickets, please report this bug on Discord (tracking ID: 20948403df).


Please look at the generated plan. If something looks wrong, please add more details to your issue.

File Path Proposed Changes
sweepai/handlers/on_ticket.py Modify sweepai/handlers/on_ticket.py with contents:
• Locate the section in the on_ticket function where files are fetched or operations related to file fetching are performed. This could be around interactions with the GitHub API for retrieving repository files or any custom logic for file processing.
• Wrap the file fetching operations in a try-except block to catch exceptions. In the except block, log the exception using the existing logger instance with an appropriate error message that includes the tracking_id for context. For example: logger.error(f"Failed to fetch files for tracking_id={tracking_id}: {e}"), where e is the caught exception.
• After logging the error, decide on the appropriate action. If the operation can continue without the fetched files, allow the function to proceed. If the files are critical for the operation, return a failure response similar to other failure points in the function, e.g., return {"success": False, "reason": "Failed to fetch files"}.
• Ensure that any modifications maintain the existing structure and logic of the on_ticket function, focusing solely on improving error handling and resilience.
• Review changes to ensure that they follow the coding standards of the repository and do not introduce any syntax errors.

🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To recreate the pull request edit the issue title or description.

This is an automated message generated by Sweep AI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

No branches or pull requests

2 participants