-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Description
Reasons:
- The app whitelabel tries to import frappe inside whitelabel/init.py
- During pip installation, frappe is not yet available, so it crashes
- This stops ALL apps from installing
- Migration fails
- Your site cannot load
Solution: Fully Safe init.py
We must wrap all frappe usage in a safe try/except. Here is a suggested content for the file: apps/whitelabel/whitelabel/init.py :
`# -- coding: utf-8 --
from future import unicode_literals
version = "0.0.1"
Safe fallback (used during pip install)
logo = "/assets/whitelabel/images/whitelabel_logo.jpg"
Try to import frappe ONLY at runtime (NOT during pip install)
try:
import frappe
if frappe.conf and frappe.conf.get("app_logo_url"):
__logo__ = frappe.conf.get("app_logo_url") or __logo__
except Exception:
# During pip install, or if frappe is unavailable
pass`
Hope that help
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels