Import IDF file runtime error: Solution exception:'NoneType' object is not subscriptable

Hello

I had my simulation working and came back to it, made a few small changes, and am now getting a runtime error:

  1. Solution exception:‘NoneType’ object is not subscriptable

I’ve looked and found a similar issue on another forum and the problem was to do with scheduling, so I tried to remove all the schedules from my file, re ran and am still getting the same error.

Please let me know if anyone has had similar issues and if anyone has a solution!

Thank you very much in advance.


RuntimeError.gh (992.3 KB)

I have found how to solve the error. My shading geometry running through the HB context surfaces component was causing the problem. It will now import IDF but I do not understand why it stopped working? I have not made any changes to the geometry and was working fine the previous time I had the file open?

I have tried simplifying the geometry to simple boxes and am still getting the error.

The error is self-explanatory. You are trying to subscript an object which you think is a list or dict, but actually is None. This means that you tried to do:

None[something]

This error means that you attempted to index an object that doesn’t have that functionality. You might have noticed that the method sort() that only modify the list have no return value printed – they return the default None. ‘NoneType’ object is not subscriptable is the one thrown by python when you use the square bracket notation object[key] where an object doesn’t define the getitem method . This is a design principle for all mutable data structures in Python.