ListChangeUnallowed: Rpython error message could be improved

Create issue
Issue #2032 invalid
Edd Barrett created an issue

Users are unlikely to understand this error message:

[translation:ERROR] ListChangeUnallowed:
[translation:ERROR]
[translation:ERROR] list merge with a resized
[translation:ERROR]
[translation:ERROR]
[translation:ERROR] Occurred processing the following simple_call:
...

Found when developing pypy/hippy bridge.

Cheers

Comments (6)

  1. Armin Rigo

    Please give an example of how you got this error; it may help us come up with a better error message.

  2. Armin Rigo

    Sorry, no clue. The clone() method is fine. The problem is likely coming from somewhere else. I guess we need to reproduce from the sources and see for ourselves.

  3. Vincent Legoll

    This one :

    [translation:ERROR] ListChangeUnallowed:
    [translation:ERROR]
    [translation:ERROR] list merge with a resized
    [translation:ERROR]
    [translation:ERROR]
    [translation:ERROR]     v639 = setattr(ctypefunc_0, ('fargs'), fvarargs_0)
    [translation:ERROR]
    [translation:ERROR] In <FunctionGraph of (pypy.module._cffi_backend.ctypefunc:62)W_CTypeFunc.new_ctypefunc_completing_argtypes at 0x4a2cd868>:
    [translation:ERROR] Happened at file /home/vlegoll/repo/upstream/pypy/pypy/module/_cffi_backend/ctypefunc.py line 79
    [translation:ERROR]
    [translation:ERROR]             ctypefunc = instantiate(W_CTypeFunc)
    [translation:ERROR]             ctypefunc.space = space
    [translation:ERROR] ==>         ctypefunc.fargs = fvarargs
    [translation:ERROR]             ctypefunc.ctitem = self.ctitem
    [translation:ERROR]             #ctypefunc.cif_descr = NULL --- already provided as the default
    [translation:ERROR]             CifDescrBuilder(fvarargs, self.ctitem, self.abi).rawallocate(ctypefunc)
    [translation:ERROR]
    [translation:ERROR] Known variable annotations:
    [translation:ERROR]  ctypefunc_0 = SomeInstance(can_be_None=False, classdef=pypy.module._cffi_backend.ctypefunc.W_CTypeFunc)
    [translation:ERROR]  fvarargs_0 = SomeList(listdef=<[SomeInstance(can_be_None=True, classdef=pypy.module._cffi_backend.ctypeobj.W_CType)]mr>)
    [translation:ERROR]
    [translation:ERROR] Processing block:
    [translation:ERROR]  block@178 is a <class 'rpython.flowspace.flowcontext.SpamBlock'>
    [translation:ERROR]  in (pypy.module._cffi_backend.ctypefunc:62)W_CTypeFunc.new_ctypefunc_completing_argtypes
    [translation:ERROR]  containing the following operations:
    [translation:ERROR]        ctypefunc_0 = simple_call((function instantiate), (type W_CTypeFunc))
    [translation:ERROR]        v640 = setattr(ctypefunc_0, ('space'), space_83)
    [translation:ERROR]        v639 = setattr(ctypefunc_0, ('fargs'), fvarargs_0)
    [translation:ERROR]        v641 = getattr(self_213, ('ctitem'))
    [translation:ERROR]        v642 = setattr(ctypefunc_0, ('ctitem'), v641)
    [translation:ERROR]        v643 = getattr(self_213, ('ctitem'))
    [translation:ERROR]        v644 = getattr(self_213, ('abi'))
    [translation:ERROR]        v645 = simple_call((type CifDescrBuilder), fvarargs_0, v643, v644)
    [translation:ERROR]        v646 = getattr(v645, ('rawallocate'))
    [translation:ERROR]        v647 = simple_call(v646, ctypefunc_0)
    [translation:ERROR]  --end--
    
  4. Armin Rigo

    Closing as invalid unless the OP wants to comment more. We can't magically improve an error message if we don't know why you get the error in the first place...

  5. Log in to comment