Error with SCA101-Lab 2_1 - Power analysis for password bypass

Hi, I am new to using the chipwhisperer, therefore I am going through the courses.
Right now im on SCA101-lab 2_1B. In the start they want me to copy in some code from the 2_1A, to then run it. The code looks like this:
def cap_pass_trace(pass_guess):
num_char = target.in_waiting()
while num_char > 0:, 10)
num_char = target.in_waiting()

ret = scope.capture()
if ret:
    print('Timeout happened during acquisition')

trace = scope.get_last_trace()
return trace

trace_test = cap_pass_trace(“h\n”)

#Basic sanity check
assert(len(trace_test) == 3000)
print(“:heavy_check_mark: OK to continue!”)‘’’

The issue is that when I try to run this I get this error:

NameError: name ‘reset_target’ is not defined

What should I do to fix this?

Looks like this is an error that you introduced; our code calls reset_target(), not cw.reset_target():

Sorry for the confusion but that was a fix i tried to do. I tried to import chipwhisperer as cw. and then call on all the chipwhisperer functions. Even though i reset it back to normal it still does not work.

Edit: After trying some, i cant seem to run any chipwhisperer code from this sheet. i tried to copy the commands that are run in the hardware sheet into the main sheet but none of the functions are able to run.

Edit_2: This might be an issue with the main files. Since 2_1 (hardware) and 3_1 ( hardware) seems to run all the code fine. But 2_1(main) and 3_1(main) can not seem to run chipwhisperer code. On 3_1(Main) i tried to run : “%run “…/…/Setup_Scripts/Setup_Generic.ipynb”” which results in a bunch of:" name ‘<function_name>’ is not defined"

Have a peak at the solution (SOLN_Lab 2_1B - Power Analysis for Password Bypass.ipynb) to see what the “main” notebook is supposed to look like in order for it to run properly.

If you still have problems, update this thread with the errors that you get when running the unmodified solution notebook.