'module' object has no attribute 'O_RDWR'

I’ve been converting a definition to use the LadybugTools1.0 components. This definition has an energy simulation and a Radiance simulation. Everything was working fine for the energy simulation part a minute ago, but as I tried to rebuild the daylighting part, I realised my Radiance version wasn’t compatible for V1.0. So, I installed the version that is recommended on the compatibility matrix on Github.

As soon as I reloaded my definition, ALL of the new Ladybug/Honeybee components now have the same error message.

Here is the full traceback, in this case from the DownloadEPW component:

Runtime error (MissingMemberException): 'module' object has no attribute 'O_RDWR'

Traceback:
  line 65, in <module>, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\tempfile.py"
  line 4, in <module>, "C:\Users\max.marschall\ladybug_tools\python\Lib\site-packages\ladybug\logutil.py"
  line 6, in <module>, "C:\Users\max.marschall\ladybug_tools\python\Lib\site-packages\ladybug\__init__.py"
  line 38, in script

Please help!

@chris @mostapha This might be a question for you - would really appreciate some help!

After some deinstalling and reinstalling the error message went away. I then started getting the PInvoke error message which I solved following this post: How to get Honeybee Legacy working with OpenStudio 3.0

Judging from the error message, @MaxMarschall , I don’t think the issue was directly related to Radiance. It seems that, somehow, you managed to break somethin in the IronPython plugin that Rhino uses since the tempfile is a native Python module and not specific to ladybug tools. In other words, you could have gotten the same error by putting the following into a GHPython component:

import tempfile

In any case, I am glad that you fixed it. When you say that you “reinstalled”, did you just reinstall Ladybug Tools? Or did you reinstall Rhino?

Hi @chris, I reinstalled various versions of OpenStudio and Radiance (and maybe also LBT), and in different locations, i.e. C:\ vs. C:\ Users\username\ladybug_tools