Environmental Analysis Tools - Failed to import ladybug_vtk!

Rhino version Rhino 8 SR10 2024-8-13 (Rhino 8, 8.10.24226.13001, Git hash:master @ c36ab43d576d4854b29b091b6b3a38e09decabf5). I am running this under the .Net Framework.

Pollination Rhino Plugin version 1.50.1

On firing Po_Sunpath I see this.

I checked the packages installed for python at C:\Program Files\ladybug_tools\python and I see ladybug-vtk 0.14.3 installed

Not sure why the Pollination Rhino plugin is not able to recognize it.

Would you recommend me trying any older version where the Environmental Analysis Tools are more stable?

1 Like

Thank you, @devang for pointing this out.

Thatā€™s just a print of the error which we should probably donā€™t do not to confuse the users. You get the error because the ladybug-vtk library is using the Python 3 typing notion that is not valid in Python 2.

It shouldnā€™t affect the commands and you should be able to use them with no issues.

We should probably remove the print for these import errors and only log them to avoid confusion in cases like this one.

The more elegant way is probably to pick the Python 3 specific error and donā€™t print them when importing happens from Python 2.

Hey @devang ,

I am using Rhino 8.10 and the latest Pollination Rhino installer but I cannot recreate your issue:

We donā€™t print traceback information like that and itā€™s not even logged since we catch the exception here and just log the message ā€œFailed to import ladybug_vtkā€:

Maybe you have some Rhino 8 setting on that is making you see the full traceback message, @dev ?

@chriswmackey ,Can you write SystemInfo in Rhino command line and share?

Actually, I can see the message now for some reason but itā€™s about other Ladybug Tools packages that cannot be imported into IronPython 2.7 like honeybee-ies and honeybee-idaice.

My version of Rhino didnā€™t change since my last post nor has my version of Pollination Rhino (it was last installed on 8/16 right before I posted my last response). So Iā€™m not totally sure what is going on.

I guess the only thing that I know has been updated on my machine since my last post is my core libraries. Let me think if thereā€™s something I changed that could have caused this.

Also, if itā€™s not clear to others using this post, the environmental analysis commands run fine for both of us. We are just getting this message that is not relevant and distracting.

I just updated Rhino 8 again and now the logging of the exception is no longer there:

This is making me think that maybe this is something on McNeelā€™s end. Here is the output of my SystemInfo right now in case it helps:

Rhino 8 SR10 2024-8-15 (Rhino 8, 8.10.24228.13001, Git hash:master @ f4c93f2b85de4dc69b50ed22f1b0d91445724d03)
License type: Not For Resale, build 2024-08-15
License details: Cloud Zoo

Windows 10 (10.0.19045 SR0.0) or greater (Physical RAM: 32GB)
.NET Framework 4.8.9261.0

Computer platform: DESKTOP 

Standard graphics configuration.
  Primary display and OpenGL: NVIDIA GeForce GT 1030 (NVidia) Memory: 2GB, Driver date: 6-8-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 536.23
    > Accelerated graphics device with 2 adapter port(s)
        - Secondary monitor attached to adapter port #0
        - Windows Main Display attached to adapter port #1

Secondary graphics devices.
  Intel(R) UHD Graphics (Intel) Memory: 1GB, Driver date: 7-29-2022 (M-D-Y).
    > Integrated graphics device with 4 adapter port(s)
        - Secondary monitor attached to adapter port #0

OpenGL Settings
  Safe mode: Off
  Use accelerated hardware modes: On
  Redraw scene when viewports are exposed: On
  Graphics level being used: OpenGL 4.6 (primary GPU's maximum)
  
  Anti-alias mode: 4x
  Mip Map Filtering: Linear
  Anisotropic Filtering Mode: High
  
  Vendor Name: NVIDIA Corporation
  Render version: 4.6
  Shading Language: 4.60 NVIDIA
  Driver Date: 6-8-2023
  Driver Version: 31.0.15.3623
  Maximum Texture size: 32768 x 32768
  Z-Buffer depth: 24 bits
  Maximum Viewport size: 32768 x 32768
  Total Video Memory: 2 GB

Rhino plugins that do not ship with Rhino
  C:\Program Files\pollination\plugin\8.0\Pollination\Environmental_Analysis.rhp	"Environmental Analysis"	0.0.0.0
  C:\Program Files\pollination\plugin\8.0\Pollination\Pollination.RH.rhp	"Pollination.RH"	1.50.1.0
  C:\ProgramData\McNeel\Rhinoceros\packages\8.0\LadybugTools\1.38.218\Ladybug.RH.Loader.rhp	"Ladybug.RH.Loader"	1.38.218.0
  C:\ProgramData\McNeel\Rhinoceros\packages\8.0\Pollination\1.50.1\Pollination.RH.Loader.rhp	"Pollination.RH.Loader"	1.50.1.0
  C:\Program Files\pollination\plugin\8.0\Pollination\ModelEditorRhinoPlugin.rhp	"ModelEditorRhinoPlugin"	1.14.0.0

Rhino plugins that ship with Rhino
  C:\Program Files\Rhino 8\Plug-ins\Commands.rhp	"Commands"	8.10.24228.13001
  C:\Program Files\Rhino 8\Plug-ins\rdk.rhp	"Renderer Development Kit"	
  C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp	"Rhino Render"	8.10.24228.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoRender.rhp	"Legacy Rhino Render"	
  C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp	"RDK_EtoUI"	8.10.24228.13001
  C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp	"Snapshots"	
  C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp	"MeshCommands"	8.10.24228.13001
  C:\Program Files\Rhino 8\Plug-ins\IronPython\RhinoDLR_Python.rhp	"IronPython"	8.10.24228.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp	"RhinoCycles"	8.10.24228.13001
  C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp	"Toolbars"	8.10.24228.13001
  C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp	"3Dconnexion 3D Mouse"	
  C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp	"Displacement"	
  C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp	"SectionTools"	

@chriswmackey, I donā€™t think it has anything to do with the version. It is happening because Rhino caches the imports the first time. If you close Rhino, restart your machine, open Rhino again, and try to run the command you will see the error the first time but it goes away the second time.

In the past, this message used to show up the first time that someone would open Grasshopper and drop a Ladybug Tools component. I think thatā€™s why no one noticed it before.

The reason it shows up is that logger.exception prints out the exception to the stdout.

image

I didnā€™t check the log configurations in the core libraries but this is something that we should be able to change.

[UPDATE]
Here is where the console_log_level is set. I donā€™t know if we want to change it only for this particular case. This might result in us missing the cases that there is indeed a real issue with importing the extensions.

A better solution is to check the error message and the version of the Python executor, and only log it if appropriate.

1 Like

A better solution is to check the error message and the version of the Python executor, and only log it if appropriate.

Ah, I really like this idea. So, if we find that the version of python is 2.7, we donā€™t log it as an exception.

1 Like

Ok, I implemented the check for the Python version here in ladybug-core:

ā€¦ and here in honeybee-core:

So, in the next release, we shouldnā€™t have any cases where this gets logged in Python 2.

This should be addressed in the latest release (v1.51.2).

@devang, feel free to re-open the topic if you still see the error message.

1 Like