HB Adaptive Comfort Map Error and Missing .log File


I was trying to use the HB Adaptive Comfort Map component but was getting an error. I haven’t been able to track down the source of the error as the log file seems to be missing (that is part of the error message):

Error Message: Runtime error (FileNotFoundException): Could not find file “/Users/samm/simulation/tcTest/adaptive_comfort_map/logs/logs.log”

line 357, in luigi_execution_summary, “/Users/samm/Library/Application Support/McNeel/Rhinoceros/6.0/scripts/lbt_recipes/recipe.py”
line 398, in failure_message, “/Users/samm/Library/Application Support/McNeel/Rhinoceros/6.0/scripts/lbt_recipes/recipe.py”
line 191, in script

The folder being referenced in the error message has other files named log but no .log file.

I’m unsure if these are relevant but the Traceback references lines 357 and 398 in the recipe.py file which are the following:

Here is a file recreating the issue:
thermalcomfort_test.gh (71.2 KB)

Thanks, @samshadow .

I was able to recreate the error on my Wife’s Mac and it’s an error that affects all of the recipe components. Thanks for reporting this I can see that this is the real error I get for a daylight-factor calculation:

Traceback (most recent call last):
  File "/Users/chris/Library/Application Support/McNeel/Rhinoceros/7.0/scripts/lbt_recipes/daylight_factor/run.py", line 163, in <module>
    start(project_folder, user_values, workers)
  File "/Users/chris/Library/Application Support/McNeel/Rhinoceros/7.0/scripts/lbt_recipes/daylight_factor/run.py", line 119, in start
  File "/Users/chris/ladybug_tools/python/lib/python3.7/site-packages/luigi/task_register.py", line 98, in __call__
    h[k] = instantiate()
  File "/Users/chris/ladybug_tools/python/lib/python3.7/site-packages/luigi/task_register.py", line 79, in instantiate
    return super(Register, cls).__call__(*args, **kwargs)
  File "/Users/chris/ladybug_tools/python/lib/python3.7/site-packages/luigi/task.py", line 466, in __init__
    self.task_id = task_id_str(self.get_task_family(), self.to_str_params(only_significant=True, only_public=True))
  File "/Users/chris/ladybug_tools/python/lib/python3.7/site-packages/luigi/task.py", line 128, in task_id_str
    param_hash = hashlib.new('md5', param_str.encode('utf-8'), usedforsecurity=False).hexdigest()
  File "/Users/chris/ladybug_tools/python/lib/python3.7/hashlib.py", line 136, in __py_new
    return __get_builtin_constructor(name)(data, **kwargs)
TypeError: md5() takes at most 1 argument (2 given)

It looks like there’s an issue in luigi and they might have dropped support for Python 3.7. Luckily, we are about to upgrade to Python 3.10 for the LBT 1.7 release that should be happening in the next few days. I will test to see if this fixes it.

In the meantime, you can get the recipe to run by using the LB Versioner to go back in time to the stable LBT 1.6.0 release. With that, I am able to run this recipe again without issues.

I have another (temporary) workaround if you really don’t want to go back to the LBT 1.6.0 stable release, which is that you can run the following command from the terminal after every time that you run the LB Versioner on Mac:

/Users/[USERNAME]/ladybug_tools/python/bin/python3 -m pip install queenbee-local==0.6.2

And just replace [USERNAME] with your real username. If I can’t find a better solution in the next few days, this is the workaround that I will build into LBT 1.7 to make sure the release fully works on Mac. Hopefully, we can just update the version of Python in the 1.7 release and this will be a better fix. But you can rest assured that it will all be addressed by 1.7.

I went back to the LBT 1.6.0 release, that works fine for me! Looking forward to the 1.7 release and thanks so much Chris for all your work & help.

1 Like

Thanks, @samshadow .

I ended up figuring out an elegant way to implement the workaround and so I actually just updated the latest development version of the plugin to use it. If you run the LB Versioner to get the latest development version, you should find that you are able to run the recipes again.

Sorry for the long set of messages deliberating how to fix this.

And thanks again for bringing this up. I’m very glad that we caught this before the 1.7 release.