500 error when attaching files

When uploading attachments getting a 500 error as shown in the screenshots.

Any help would be appreciated.

WebSocket connection to ‘wss://hr.m/socket.io/?EIO=4&transport=websocket&sid=cR2nBJuID8EPmKG2AABE’ failed:
doOpen @ websocket.js:43

FileUploader.vue:556 POST https://hr.rt.com/api/method/upload_file 500

You got the solution?

Can you provide Traceback from Network Panel ?

“["Traceback (most recent call last):\n File \"apps/frappe/frappe/app.py\", line 95, in application\n response = frappe.api.handle()\n File \"apps/frappe/frappe/api.py\", line 54, in handle\n return frappe.handler.handle()\n File \"apps/frappe/frappe/handler.py\", line 47, in handle\n data = execute_cmd(cmd)\n File \"apps/frappe/frappe/handler.py\", line 85, in execute_cmd\n return frappe.call(method, **frappe.form_dict)\n File \"apps/frappe/frappe/init.py\", line 1622, in call\n return fn(*args, **newargs)\n File \"apps/frappe/frappe/handler.py\", line 223, in upload_file\n return frappe.get_doc(\n File \"apps/frappe/frappe/model/document.py\", line 307, in save\n return self._save(*args, **kwargs)\n File \"apps/frappe/frappe/model/document.py\", line 329, in _save\n return self.insert()\n File \"apps/frappe/frappe/model/document.py\", line 278, in insert\n self.run_method(\"after_insert\")\n File \"apps/frappe/frappe/model/document.py\", line 917, in run_method\n out = Document.hook(fn)(self, *args, **kwargs)\n File \"apps/frappe/frappe/model/document.py\", line 1276, in composer\n hooks.append(frappe.get_attr(handler))\n File \"apps/frappe/frappe/init.py\", line 1612, in get_attr\n return getattr(get_module(modulename), methodname)\n File \"apps/frappe/frappe/init.py\", line 1342, in get_module\n return importlib.import_module(modulename)\n File \"/opt/homebrew/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/init.py\", line 126, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n File \"\", line 1050, in _gcd_import\n File \"\", line 1027, in _find_and_load\n File \"\", line 1006, in _find_and_load_unlocked\n File \"\", line 688, in _load_unlocked\n File \"\", line 883, in exec_module\n File \"\", line 241, in _call_with_frames_removed\n File \"apps/frappe_s3_attachment/frappe_s3_attachment/controller.py\", line 9, in \n import boto3\n File \"env/lib/python3.10/site-packages/boto3/init.py\", line 16, in \n from boto3.session import Session\n File \"env/lib/python3.10/site-packages/boto3/session.py\", line 17, in \n import botocore.session\n File \"env/lib/python3.10/site-packages/botocore/session.py\", line 25, in \n import botocore.configloader\n File \"env/lib/python3.10/site-packages/botocore/configloader.py\", line 19, in \n from botocore.compat import six\n File \"env/lib/python3.10/site-packages/botocore/compat.py\", line 23, in \n from botocore.exceptions import MD5UnavailableError\n File \"env/lib/python3.10/site-packages/botocore/exceptions.py\", line 15, in \n from botocore.vendored.requests.exceptions import ConnectionError\n File \"env/lib/python3.10/site-packages/botocore/vendored/requests/init.py\", line 58, in \n from . import utils\n File \"env/lib/python3.10/site-packages/botocore/vendored/requests/utils.py\", line 26, in \n from .compat import parse_http_list as _parse_list_header\n File \"env/lib/python3.10/site-packages/botocore/vendored/requests/compat.py\", line 7, in \n from .packages import chardet\n File \"env/lib/python3.10/site-packages/botocore/vendored/requests/packages/init.py\", line 3, in \n from . import urllib3\n File \"env/lib/python3.10/site-packages/botocore/vendored/requests/packages/urllib3/init.py\", line 10, in \n from .connectionpool import (\n File \"env/lib/python3.10/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py\", line 38, in \n from .response import HTTPResponse\n File \"env/lib/python3.10/site-packages/botocore/vendored/requests/packages/urllib3/response.py\", line 9, in \n from ._collections import HTTPHeaderDict\n File \"env/lib/python3.10/site-packages/botocore/vendored/requests/packages/urllib3/_collections.py\", line 1, in \n from collections import Mapping, MutableMapping\nImportError: cannot import name ‘Mapping’ from ‘collections’ (/opt/homebrew/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/init.py)\n"]”
exception
:
“ImportError: cannot import name ‘Mapping’ from ‘collections’ (/opt/homebrew/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/init.py)”