frappe / agriculture

Agriculture Domain for ERPNext
GNU General Public License v3.0
48 stars 55 forks source link

No such file or directory: './assets/frappe/js/lib/snap.svg-min.js #37

Open johnwslongland opened 2 months ago

johnwslongland commented 2 months ago

When opening a new soil texture doc, this error occurs. It seems to relate to the ternary plot

I also link in the previous issue where ternary was involved... https://github.com/frappe/erpnext/issues/11212

Error...

App Versions

{
    "agriapp": "0.0.1",
    "agriculture": "0.0.1",
    "erpnext": "14.71.0",
    "frappe": "14.79.0"
}

Route

Form/Soil Texture/new-soil-texture-agekllruko

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 97, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 48, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1619, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/client.py", line 351, in get_js
    with open(contentpath) as srcfile:
FileNotFoundError: [Errno 2] No such file or directory: './assets/frappe/js/lib/snap.svg-min.js'

Request Data

{
    "type": "GET",
    "args": {
        "items": "[\"assets/frappe/js/lib/snap.svg-min.js\"]"
    },
    "freeze": true,
    "headers": {},
    "error_handlers": {},
    "url": "/api/method/frappe.client.get_js"
}

Response Data


{
    "exception": "FileNotFoundError: [Errno 2] No such file or directory: './assets/frappe/js/lib/snap.svg-min.js'"
}
johnwslongland commented 2 months ago

I have solved the problem by geting the snap.svg-min.js file from https://gist.github.com/aresnick/0d213ff669b1faa9d6a6

and copying it to the required folder bench migrate bench restart

Please can the repository be updated with this file