New issue 1874: Misleading RPython error message: setting forbidden attribute
https://bitbucket.org/pypy/pypy/issue/1874/misleading-rpython-error-message-setting
Edd Barrett:
Hi,
I think I know what this error message means:
```
[translation:ERROR] NoSuchAttrError:
[translation:ERROR]
[translation:ERROR] setting forbidden attribute 'php_interp' on <ClassDef
'hippy.objects.instanceobject.W_InstanceObject'>
[translation:ERROR]
[translation:ERROR]
[translation:ERROR] v1036 = getattr(this_0, ('php_interp'))
[translation:ERROR]
[translation:ERROR] In <FunctionGraph of
(hippy.module.pypy_bridge.php_wrappers:367)wpy_exc_getMessage at 0x40cf49c0>:
[translation:ERROR] Happened at file hippy/module/pypy_bridge/php_wrappers.py
line 369
[translation:ERROR]
[translation:ERROR] ==> py_space = this.php_interp.pyspace
[translation:ERROR] msg =
py_space.str_w(py_space.str(this.w_py_exn.get_w_value(py_space)))
[translation:ERROR] return this.interp.space.wrap(msg)
[translation:ERROR]
[translation:ERROR] Known variable annotations:
[translation:ERROR] this_0 = SomeInstance(can_be_None=False,
classdef=hippy.objects.instanceobject.W_InstanceObject)
[translation:ERROR]
[translation:ERROR] Processing block:
[translation:ERROR] block@3 is a <class
'rpython.flowspace.flowcontext.SpamBlock'>
[translation:ERROR] in
(hippy.module.pypy_bridge.php_wrappers:367)wpy_exc_getMessage
[translation:ERROR] containing the following operations:
[translation:ERROR] v1036 = getattr(this_0, ('php_interp'))
[translation:ERROR] v1037 = getattr(v1036, ('pyspace'))
[translation:ERROR] v1038 = getattr(v1037, ('str_w'))
[translation:ERROR] v1039 = getattr(v1037, ('str'))
[translation:ERROR] v1040 = getattr(this_0, ('w_py_exn'))
[translation:ERROR] v1041 = getattr(v1040, ('get_w_value'))
[translation:ERROR] v1042 = simple_call(v1041, v1037)
[translation:ERROR] v1043 = simple_call(v1039, v1042)
[translation:ERROR] v1044 = simple_call(v1038, v1043)
[translation:ERROR] v1045 = getattr(this_0, ('interp'))
[translation:ERROR] v1046 = getattr(v1045, ('space'))
[translation:ERROR] v1047 = getattr(v1046, ('wrap'))
[translation:ERROR] v1048 = simple_call(v1047, v1044)
[translation:ERROR] --end--
```
It means that RPython has been unable to guarantee the existence of
`this.php_interp.pyspace`. It has nothing to do with setting any 'forbidden'
attribute. Right?
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue