Hi,
I am trying my hands-on with chipwhisperer lite FI 101 lab with PLATFORM=CWLITXMEGA,
After the instruction, gc.add("reset", (scope.glitch.width, scope.glitch.offset)),
I am getting error as Traceback (most recent call last): File "fi_practise1.py", line 184, in <module> gc.add("normal", (scope.glitch.width, scope.glitch.offset)) File "/xxxx/python3.6/site-packages/chipwhisperer/common/results/glitch.py", line 71, in add self.widget_list_groups[i].value = self.group_counts[i] TypeError: 'NoneType' object is not subscriptable
Considering I am very noob in it, plus I need to understand glitch.py code to clearly understand what actually happening. Any suggestion would be of great help.
Have you called gc.display_stats()? That being said, I’m not sure the glitch controller works outside Jupyter, so you may have to replace it with some manual loops.
Yes, this may be the reason as I implemented outside Jupyter and didn’t use gc.display_stats() as it was throwing errors. I’ll check how to handle outside jupyter. Thanks.
I just added from IPython import display and gc.display_stats() worked. I am having a problem in understanding what’s happening in this glitching part, is there some documents regarding it? For example : what is the purpose of using groups like success, reset, normal in GlitchController, what is purpose of using display_stats(), glitch_values() functions, etc dumb queries.
It’s mostly just a convenient way to group/organize/visualize data. If you don’t care about any of that stuff, I’d recommend just doing some for/while loops that increment glitch_width/offset/ext_offset/etc.
The error is self-explanatory. You are trying to subscript an object which you think is a list or dict, but actually is None (i.e: the object has no value). This means that you tried to do:
None[something]
Here 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. This is a design principle for all mutable data structures in Python.
This ‘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.