sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.43k stars 425 forks source link

Sweep: Update Error Logging in sweepai/core/context_pruning.py to Use Traceback #1626

Open sweep-nightly[bot] opened 1 year ago

sweep-nightly[bot] commented 1 year ago

In the file sweepai/core/context_pruning.py, the error logging in the except block of the prune_context method does not use traceback. This is a violation of our coding standards.

Current code:

except Exception as e:
    logger.error(f"An error occurred: {e}")
    return [], []

Please update this to include traceback information. For example:

import traceback
...
except Exception as e:
    logger.error(f"An error occurred: {e}\n{traceback.format_exc()}")
    return [], []

This will provide more detailed information in the logs when an error occurs.

sweep-nightly[bot] commented 1 year ago

0%


❌ Unable to Complete PR

It looks like an issue has occurred around fetching the files. Perhaps the repo has not been initialized. If this error persists contact team@sweep.dev.

@sweep-nightly[bot], please edit the issue description to include more details and I will automatically relaunch.

For bonus GPT-4 tickets, please report this bug on Discord.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.