Hi there
Please assist,
After updating my site, I am seeing that the accounts dashboard is now broken.
Please see the attached screenshot?
---------------------------------------------------
Here is my current version:
Installed Apps
Booking Service App: v0.0.1 (master)
ERPNext: v12.16.2 (version-12)
Frappe Framework: v12.13.0 (version-12)
smino
January 1, 2021, 10:50pm
#2
Hi,
Is this the first time that an update has been tried or has it been updated successfully before this??
Were there any messages in the console where the update command was issued?
Hi there
Yes, this is the 1st time i update.
The update went through successfully and no errors at all.
Any suggestions?
smino
January 2, 2021, 3:16pm
#4
Is ERPNext being run in Develop or Production mode?
I might try bench update --reset
Hi
Thanks for getting back to me.
It’s running in production mode.
Muzzy
January 2, 2021, 5:20pm
#6
Seems the issue is here on line 52. Some residual code I think.
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import json
import frappe
from frappe import _
from frappe.utils import add_to_date, get_link_to_form
def cache_source(function):
def wrapper(*args, **kwargs):
if kwargs.get("chart_name"):
chart = frappe.get_doc('Dashboard Chart', kwargs.get("chart_name"))
else:
chart = kwargs.get("chart")
no_cache = kwargs.get("no_cache")
if no_cache:
return function(chart = chart, no_cache = no_cache)
chart_name = frappe.parse_json(chart).name
cache_key = "chart-data:{}".format(chart_name)
if int(kwargs.get("refresh") or 0):
results = generate_and_cache_results(chart, chart_name, function, cache_key)
else:
cached_results = frappe.cache().get_value(cache_key)
if cached_results:
results = frappe.parse_json(frappe.safe_decode(cached_results))
else:
results = generate_and_cache_results(chart, chart_name, function, cache_key)
return results
return wrapper
def generate_and_cache_results(chart, chart_name, function, cache_key):
try:
results = function(chart_name = chart_name)
except TypeError as e:
if e.message == "'NoneType' object is not iterable":
# Probably because of invalid link filter
#
# Note: Do not try to find the right way of doing this because
# it results in an inelegant & inefficient solution
# ref: https://github.com/frappe/frappe/pull/9403
frappe.throw(_('Please check the filter values set for Dashboard Chart: {}').format(
get_link_to_form(chart.doctype, chart.name)), title=_('Invalid Filter Value'))
return
else:
raise
frappe.cache().set_value(cache_key, json.dumps(results, default=str))
frappe.db.set_value("Dashboard Chart", chart_name, "last_synced_on", frappe.utils.now(), update_modified = False)
return results
https://github.com/frappe/erpnext/commit/eed12444e1d1b94d06894b16e829a4f3d4ff8735
Hi there,
Thank you for the feedback on this @Muzzy , I do appreciate it.
Anyone know which codes within "Line52 "need to be removed or how do we fix this problem?
Hi all,
Just to update everyone here,
The issue is really a pain, its sad that I have just done a fresh install as shown on the below image, trying to see if the issue can go away and here we go again… as shown on the image…and on a fresh install and on a fresh Debian10 system.
This simply means anyone who will install or recently installed ERPNEXT will have this issue whereby the dashboard accounting charts are broken such as Bank Balance, Expenses and Income.
Errors: “The resource you are looking for is not available”
1 Like
system
Closed
January 17, 2021, 3:18pm
#9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.