Bug in OpenStudio Component? - folder is not defined

Hi Chris,

I’ve been working with the Model to OSM component (v1.9.2) and I’m encountering a persistent issue.

Even when I assign a valid folder path to the _folder_ input, I get the following error:

  1. Solution exception: name ‘folder’ is not defined

What’s strange is that I have another Model to OSM component with exactly the same setup (copied and pasted from the working one), and that one runs just fine. I’ve tried:

  • Replacing the folder input with a new panel containing a valid path
  • Re-copying the entire setup from scratch
  • Syncing my Grasshopper file with LB Sync Grasshopper File
  • Running everything on Ladybug Tools v1.9.2

But the error still persists on one of the components. I’m wondering if this could be a bug, as the folder variable seems to not be defined internally despite being connected.

Any advice or thoughts would be greatly appreciated!
Thanks in advance!

Hey @mm,

I cannot recreate the issue on my end. Custom folders are working just fine:

Can you upload a minimal sample file that recreates the issue?

Or can you paste the full traceback that you get from the report output of the component?

Actually, I think I figured it out by looking at the source code. It looks like there is a bug that happens only when you have specified your own DDY file under the sizing parameters. I was able to recreate it:

And I just pushed a fix here:

This one is consequential enough that I should probably update the Food4Rhino installer. I’ll post back here once I have updated it.

The fix was officially merged and I just updated the installer on Food4Rhino with the fix. The pollination single-click installers should be updated shortly.

Thanks for reporting, @mm .

Thank you so much Chris for your quick responses and for taking the time to investigate and resolve the issue. I really appreciate your support and the fix you implemented — everything is working perfectly now!

Your help made a big difference, so thanks again!