Skip to content

Conversation

@hharshhsaini
Copy link

Description

This PR fixes the RecursionError: maximum recursion depth exceeded that occurs during backend startup on Python 3.12.

Root Cause

The InterceptHandler.emit() method was calling logger.log() which triggered the same handler again, causing infinite recursion until stack overflow. Python 3.12 has stricter recursion handling which surfaces this issue more clearly.

Changes Made

  • Add recursion guard flag (_inside_emit) to InterceptHandler.emit()
  • Emit directly to root logger handlers instead of calling logger.log()
  • Skip self handler when emitting to prevent infinite loop

Before

RecursionError: maximum recursion depth exceeded File ".../logging/init.py", line XXXX, in emit File ".../setup_logging.py", line 250, in emit

After

Backend starts successfully without recursion errors on Python 3.12.

Related Issue

Fixes #918

…SSIE-Org#946

- Add PKGBUILD for binary package installation from releases
- Add PKGBUILD-git for building from source
- Add pictopy.install for post-install hooks
- Add .SRCINFO metadata file
- Add publish-aur.yml workflow for automatic AUR publishing
- Update build-and-release.yml to generate tar.gz for AUR
- Update tauri.conf.json to build all Linux targets (deb, rpm, appimage)
- Update README.md with AUR installation instructions

This enables Arch Linux users to install PictoPy via:
  yay -S pictopy
  paru -S pictopy

Closes AOSSIE-Org#946
- Add confirmation dialog with warning message before deleting a folder
- Display folder path in the confirmation dialog
- Show clear warning that the action is irreversible
- Add Cancel and Delete buttons with proper styling
- Disable buttons during deletion to prevent double-clicks

Fixes AOSSIE-Org#939
- Create ErrorBoundary component to catch JavaScript errors
- Display user-friendly fallback UI with error details
- Add 'Reload Application' button to recover from errors
- Add 'Try Again' button to attempt recovery without reload
- Wrap main App component with ErrorBoundary in main.tsx

This prevents the app from showing a blank white screen when
unhandled errors occur (e.g., network failures, missing data).

Fixes AOSSIE-Org#937
…Org#918

- Add recursion guard flag to InterceptHandler.emit()
- Emit directly to root logger handlers instead of calling logger.log()
- Skip self handler when emitting to prevent infinite loop
- Fix compatibility with Python 3.12's stricter recursion handling

The issue was caused by emit() calling logger.log() which triggered
the same handler again, causing infinite recursion until stack overflow.

Fixes AOSSIE-Org#918
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Warning

Rate limit exceeded

@hharshhsaini has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fe45e2f and 231baca.

📒 Files selected for processing (14)
  • .github/workflows/build-and-release.yml
  • .github/workflows/publish-aur.yml
  • README.md
  • aur/.SRCINFO
  • aur/PKGBUILD
  • aur/PKGBUILD-git
  • aur/README.md
  • aur/pictopy.install
  • backend/app/logging/setup_logging.py
  • frontend/src-tauri/tauri.conf.json
  • frontend/src/components/ErrorBoundary/ErrorBoundary.tsx
  • frontend/src/components/ErrorBoundary/index.ts
  • frontend/src/main.tsx
  • frontend/src/pages/SettingsPage/components/FolderManagementCard.tsx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added backend bug Something isn't working labels Jan 5, 2026
@hharshhsaini hharshhsaini deleted the fix/recursive-logging-handler branch January 6, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RecursionError during backend startup on Python 3.12 due to recursive logging handler

2 participants