newaetech / chipwhisperer-jupyter

Interactive ChipWhisperer tutorials using Jupyter notebooks.
220 stars 70 forks source link

Bokeh Error in lab 4.1 #44

Closed LeDav1 closed 1 year ago

LeDav1 commented 1 year ago

https://github.com/newaetech/chipwhisperer-jupyter/blob/9cce81088f05383676ce4107b7a9f7760c040e25/courses/sca101/Lab%204_1%20-%20Power%20and%20Hamming%20Weight%20Relationship%20(MAIN).ipynb#L142-L159 Running the above code from lab4.1 results in

SerializationError: can't serialize <class 'range'> 

I'm running the default packages from requirements.txt with the suggested pyenv 3.9.5. Bokeh 3.1.1 is relatively new, maybe thats the issue? I found a quick fix, try replacing:

# xrange = range(len(trace_array[0]))[plot_start:plot_end]

with

xrange = [x for x in range(len(trace_array[0]))][plot_start:plot_end] 
alex-dewar commented 1 year ago

Thanks for the report and the fix. Can you try the latest jupyter commit and see if my changes fix your issue?

LeDav1 commented 1 year ago

Fixed. Closing the issue.