diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index ff1a02821a58fc246f1d7fbfcdde8efa14683b55..d7133adf058920cecb4e64d9b49d71a7d25aeec7 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -2058,6 +2058,11 @@ class A:
         except AttributeError as exc:
             self.assertEqual("bluch", exc.name)
             self.assertEqual(obj, exc.obj)
+        try:
+            object.__getattribute__(obj, "bluch")
+        except AttributeError as exc:
+            self.assertEqual("bluch", exc.name)
+            self.assertEqual(obj, exc.obj)
 
     def test_getattr_has_name_and_obj_for_method(self):
         class A:
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-08-28-10-51-19.gh-issue-96352.jTLD2d.rst b/Misc/NEWS.d/next/Core and Builtins/2022-08-28-10-51-19.gh-issue-96352.jTLD2d.rst
new file mode 100644
index 0000000000000000000000000000000000000000..25ab9678715a92064a3d8d40f1f607c27aa54644
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2022-08-28-10-51-19.gh-issue-96352.jTLD2d.rst	
@@ -0,0 +1,2 @@
+Fix :exc:`AttributeError` missing ``name`` and ``obj`` attributes in
+:meth:`object.__getattribute__`. Patch by Philip Georgi.
diff --git a/Objects/object.c b/Objects/object.c
index cb7853ca8cfd99ea8b19d5a6ccdf81525a3a7801..6a22f27de0b1c892b7385187ad6d04ce34958ddd 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1352,6 +1352,8 @@ _PyObject_GenericGetAttrWithDict(PyObject *obj, PyObject *name,
         PyErr_Format(PyExc_AttributeError,
                      "'%.50s' object has no attribute '%U'",
                      tp->tp_name, name);
+
+        set_attribute_error_context(obj, name);
     }
   done:
     Py_XDECREF(descr);