Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

New map iteration -- INTERNAL ERROR. Trying to set type of an unbound or captured variable.

George_AndersonGeorge_Anderson Member Posts: 71 ✭✭
Using the latest Featurescript, I'm intermittently getting this message:
INTERNAL ERROR. Trying to set type of an unbound or captured variable.
It always points to various places in my code where I started to use the new support for nicer map iteration:
for (var key, value in myMap){
It's happening only rarely, and unpredictably, and seems to reset sometimes when refreshing the page, or switching tabs, so I don't think it is based on different part studio states (like different variable values). I'd file a bug report, but I can't seem to see any pattern, just checking if anyone has seen this.


  • alnisalnis Member, Developers Posts: 446 EDU
    edited July 2021
    Even if there isn't a regular pattern, if Onshape seems to be behaving incorrectly, you can/should always file a bug report (and share the document if possible/applicable). That will let the support team investigate document logs that might have more info about what exactly is inconsistent, plus it will be a more direct notification that there is a problem.

    Edit: the team is aware of it and it is a priority to fix. The current workaround is to avoid the new for loop syntax.
    Student at University of Washington | Get in touch: [email protected] | My personal site: https://alnis.dev | Currently an Onshape intern: [email protected]
  • George_AndersonGeorge_Anderson Member Posts: 71 ✭✭
    Nothing quite like the inside scoop!
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 564
    FYI, with the release of Onshape 1.134 this issue is resolved

    Feel free to use this new 2-variable for loop syntax any time you iterate through a map or an array!
Sign In or Register to comment.