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

chore: error logging for auto material requests #31103

Merged
merged 1 commit into from
May 23, 2022

Conversation

ankush
Copy link
Member

@ankush ankush commented May 23, 2022

Traceback (most recent call last):
  File "apps/frappe/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py", line 85, in execute
    frappe.get_attr(self.method)()
  File "apps/erpnext/erpnext/stock/reorder_item.py", line 22, in reorder_item
    return _reorder_item()
  File "apps/erpnext/erpnext/stock/reorder_item.py", line 99, in _reorder_item
    return create_material_request(material_requests)
  File "apps/erpnext/erpnext/stock/reorder_item.py", line 222, in create_material_request
    notify_errors(exceptions_list)
  File "apps/erpnext/erpnext/stock/reorder_item.py", line 256, in notify_errors
    exception = json.loads(exception)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

If traceback is not found for some error then error reporting fails.

@github-actions github-actions bot added needs-tests This PR needs automated unit-tests. stock labels May 23, 2022
@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #31103 (7143556) into develop (a36174a) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##           develop   #31103   +/-   ##
========================================
  Coverage    63.19%   63.19%           
========================================
  Files          986      986           
  Lines        67358    67361    +3     
========================================
+ Hits         42564    42569    +5     
+ Misses       24794    24792    -2     
Impacted Files Coverage Δ
erpnext/stock/reorder_item.py 74.16% <0.00%> (-3.62%) ⬇️
...rial_no_valuation/incorrect_serial_no_valuation.py 85.96% <0.00%> (-10.53%) ⬇️
...rpnext/accounts/doctype/shareholder/shareholder.py 80.00% <0.00%> (-10.00%) ⬇️
...pnext/accounts/report/gross_profit/gross_profit.py 80.24% <0.00%> (-7.41%) ⬇️
...t/accounts/report/sales_register/sales_register.py 71.92% <0.00%> (-5.85%) ⬇️
...e/asset_value_adjustment/asset_value_adjustment.py 86.04% <0.00%> (-3.49%) ⬇️
erpnext/utilities/activation.py 62.85% <0.00%> (-2.86%) ⬇️
...em_wise_sales_register/item_wise_sales_register.py 61.99% <0.00%> (-0.91%) ⬇️
erpnext/stock/report/stock_ledger/stock_ledger.py 84.92% <0.00%> (-0.80%) ⬇️
... and 21 more

@ankush ankush merged commit ecb39d8 into frappe:develop May 23, 2022
mergify bot pushed a commit that referenced this pull request May 23, 2022
ankush added a commit that referenced this pull request May 24, 2022
…1105)

chore: error logging for auto material requests (#31103)

(cherry picked from commit ecb39d8)

Co-authored-by: Ankush Menat <me@ankush.dev>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-13-hotfix needs-tests This PR needs automated unit-tests. stock
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant