[pypy-issue] Issue #2019: rpython Cannot find attribute 'isspace' on SomeUnicodeCodePoint() (pypy/pypy)

Jeong YunWon issues-reply at bitbucket.org
Fri Apr 10 02:25:39 CEST 2015


New issue 2019: rpython Cannot find attribute 'isspace' on SomeUnicodeCodePoint()
https://bitbucket.org/pypy/pypy/issue/2019/rpython-cannot-find-attribute-isspace-on

Jeong YunWon:

```
[translation:info] Error:
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/translator/goal/translate.py", line 318, in main
[translation:info]     drv.proceed(goals)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/translator/driver.py", line 539, in proceed
[translation:info]     return self._execute(goals, task_skip = self._maybe_skip())
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute
[translation:info]     res = self._do(goal, taskcallable, *args, **kwds)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/translator/driver.py", line 276, in _do
[translation:info]     res = func()
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/translator/driver.py", line 343, in task_rtype_lltype
[translation:info]     rtyper.specialize(dont_simplify_again=True)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/rtyper.py", line 176, in specialize
[translation:info]     self.specialize_more_blocks()
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/rtyper.py", line 216, in specialize_more_blocks
[translation:info]     self.specialize_block(block)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/rtyper.py", line 304, in specialize_block
[translation:info]     self.translate_hl_to_ll(hop, varmapping)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/rtyper.py", line 430, in translate_hl_to_ll
[translation:info]     resultvar = hop.dispatch()
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/rtyper.py", line 647, in dispatch
[translation:info]     return translate_meth(self)
[translation:info]    File "<160-codegen /Volumes/Userspace/Projects/pypy/rpython/rtyper/rtyper.py:496>", line 4, in translate_op_simple_call
[translation:info]     return r_arg1.rtype_simple_call(hop)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/rbuiltin.py", line 140, in rtype_simple_call
[translation:info]     return bltintyper(hop2)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/rstr.py", line 168, in rtype_method_strip
[translation:info]     return hop.gendirectcall(func, *args_v)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/rtyper.py", line 685, in gendirectcall
[translation:info]     return self.llops.gendirectcall(ll_function, *args_v)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/rtyper.py", line 867, in gendirectcall
[translation:info]     rtyper.lowlevel_ann_policy)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/rtyper/annlowlevel.py", line 95, in annotate_lowlevel_helper
[translation:info]     return annotator.annotate_helper(ll_function, args_s, policy)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/annotator/annrpython.py", line 111, in annotate_helper
[translation:info]     self.complete_helpers(policy)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/annotator/annrpython.py", line 119, in complete_helpers
[translation:info]     self.complete()
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/annotator/annrpython.py", line 189, in complete
[translation:info]     self.complete_pending_blocks()
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/annotator/annrpython.py", line 184, in complete_pending_blocks
[translation:info]     self.processblock(graph, block)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/annotator/annrpython.py", line 336, in processblock
[translation:info]     self.flowin(graph, block)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/annotator/annrpython.py", line 408, in flowin
[translation:info]     self.consider_op(op)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/annotator/annrpython.py", line 582, in consider_op
[translation:info]     resultcell = op.consider(self)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/flowspace/operation.py", line 104, in consider
[translation:info]     return spec(annotator, *self.args)
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/flowspace/operation.py", line 204, in specialized
[translation:info]     return impl(*[annotator.annotation(x) for x in other_args])
[translation:info]    File "/Volumes/Userspace/Projects/pypy/rpython/annotator/unaryop.py", line 160, in getattr
[translation:info]     raise AnnotatorError("Cannot find attribute %r on %r" % (attr, self))
[translation:ERROR] AnnotatorError:
[translation:ERROR]
[translation:ERROR] Cannot find attribute 'isspace' on SomeUnicodeCodePoint()
[translation:ERROR]
[translation:ERROR]
[translation:ERROR]     v234 = getattr(v233, ('isspace'))
[translation:ERROR]
[translation:ERROR] In <FunctionGraph of (rpython.rtyper.lltypesystem.rstr:426)ll_strip_default__rpy_unicodePtr_Bool_Bool at 0x10e1d2b10>:
[translation:ERROR] Happened at file /Volumes/Userspace/Projects/pypy/rpython/rtyper/lltypesystem/rstr.py line 435
[translation:ERROR]
[translation:ERROR] ==>             while lpos < rpos and s.chars[lpos].isspace():
[translation:ERROR]
[translation:ERROR] Known variable annotations:
[translation:ERROR]  v233 = SomeUnicodeCodePoint()
[translation:ERROR]
[translation:ERROR] Processing block:
[translation:ERROR]  block at 77 is a <class 'rpython.flowspace.flowcontext.SpamBlock'>
[translation:ERROR]  in (rpython.rtyper.lltypesystem.rstr:426)ll_strip_default__rpy_unicodePtr_Bool_Bool
[translation:ERROR]  containing the following operations:
[translation:ERROR]        v235 = getattr(s_0, ('chars'))
[translation:ERROR]        v233 = getitem(v235, lpos_0)
[translation:ERROR]        v234 = getattr(v233, ('isspace'))
[translation:ERROR]        v236 = simple_call(v234)
[translation:ERROR]        v237 = bool(v236)
[translation:ERROR]  --end--
```





More information about the pypy-issue mailing list