ladybug-tools / ladybug-legacy

:beetle: Ladybug is an environmental plugin for Grasshopper.
http://ladybug.tools
Other
192 stars 82 forks source link

Address missing Tls12 protocol preventing ladybug flying on MacOS #442

Closed philipbelesky closed 6 years ago

philipbelesky commented 6 years ago

Apologies, I couldn't find any where in the documentation that lists whether MacOS is officially supported on the legacy plugin. If that's not the case feel free to reject this PR.

This issue is with the legacy version of the plugin LB 0.0.66 and HB 0.0.63 downloaded from Food4Rhino. Rhino 5.4.1 for Mac and GH 0.9.0080. I've reproduced it on several similar setups.

Placing the ladybug_ladybug component on a blank canvas yields an exception "'type' object has no attribute Tls12" on MacOS. This is due to line 63 of the source:

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12

...because I assume that API isn't available to .NET Core on MacOS. However removing that line (or catching it in this manner) allows ladybug to fly correctly.

Thanks again Mostapha and Chris for your work in maintaining and developing ladybug tools as OSS!

philipbelesky commented 6 years ago

Oops just figured out a better implementation; will submit momentarily