Menu

#592 Variable conversion error

Quesnay
closed
nobody
None
4normal
2017-12-07
2016-06-06
Steve Keen
No

"An oldie but a goodie". This turned up when I tried to convert a different variable--the interest rate--from a variable to a parameter.

stock variables in Godley tables cannot be converted to a different type
stock variables in Godley tables cannot be converted to a different type
while executing
"minsky.convertVarType :Loans^CB_S parameter"
("eval" body line 1)
invoked from within
"eval minsky.convertVarType $args"
(procedure "convertVarType" line 1)
invoked from within
"convertVarType [var.valueId] $editVarInput(Type)"
invoked from within
".wiring.editVar.buttonBar.ok invoke"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list $w invoke]"
(procedure "tk::ButtonUp" line 24)
invoked from within
"tk::ButtonUp .wiring.editVar.buttonBar.ok"
(command bound to event)

2 Attachments

Discussion

  • High Performance Coder

    But Loans^CB_S appears as a stock variable in the central bank. So the error message is correct.

    However, having said that - assuming you renamed the stock variable in the Godley table, then you still cannot change the variable to a paramter. What it really needs to do is have variable name changes in the Godley table affect all of the variables, but a variable name change outside the Godley table should also change the type (ie correctly break the linkage with the Godley table reference).

     
  • High Performance Coder

    • Milestone: Cantillon --> Quesnay
     
  • High Performance Coder

    I think those changes are sufficiently complex as to need to revisit them for the Quesnay release.

     
  • Steve Keen

    Steve Keen - 2016-06-12

    I think it's something different mate--an error unrelated to whether an entity is a Godley Table component or not. Check the attached. I defined a new entity called RR{Buffer} as a way to control when banks reacted to approaching the level at which they're required to have additional reserves. I hadn't yet wired it up to anything, changed it from a flow to a parameter, made it a slider, and then tried to set the slider ranges. That generated this error message:

    stock variables in Godley tables cannot be converted to a different type
    stock variables in Godley tables cannot be converted to a different type
    while executing
    "minsky.convertVarType :Dep_HH parameter"
    ("eval" body line 1)
    invoked from within
    "eval minsky.convertVarType $args"
    (procedure "convertVarType" line 1)
    invoked from within
    "convertVarType [var.valueId] $editVarInput(Type)"
    invoked from within
    ".wiring.editVar.buttonBar.ok invoke"
    ("uplevel" body line 1)
    invoked from within
    "uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 24)
    invoked from within
    "tk::ButtonUp .wiring.editVar.buttonBar.ok"
    (command bound to event)

    But RR{Buffer} is not Dep{HH}, nor is it related to it in any way. So I think this error arises when an attempt to edit one entity is treated as being an attempt to edit another one.

     
  • Steve Keen

    Steve Keen - 2016-06-12
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,2 @@
     JubileeB03.mky (88.9 kB; application/minsky)
    +JubileeB16.mky (250.5 kB; application/minsky)
    
     
  • Steve Keen

    Steve Keen - 2016-06-12

    When I wired it up to the relevant block, I found that I could change the slider ranged as I had wished to--no problem.

     
  • Steve Keen

    Steve Keen - 2016-06-12

    Here's a screenshot of the relevant block.

     
  • High Performance Coder

    This is quite a different bug to the reported title. Creating https://sourceforge.net/p/minsky/tickets/603/ to track it, as I'd like to fix this for Cantillon.

     

    Last edit: High Performance Coder 2016-06-18
  • High Performance Coder

    Ah - rereading the ticket description - the original report is the different type, the other report is that it should be possible to change the type of a stock variable if that variable name is removed from a Godley table.

     
  • High Performance Coder

    • status: open --> fixed
     
  • High Performance Coder

    Done now. I've reinstated the exception when trying to convert a variable in a Godley table.

     
  • High Performance Coder

    • status: fixed --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





Auth0 Logo