C2 W1: TypeError: Descriptors cannot not be created directly

Hi, In course2 W1, the packages are not installed and I keep getting the abovementioned error. Is there any solution to fix this issue? Thanks!

1 Like

I have the same problem.

1 Like

Hey.
I was having the same issue and it was fixed by downgrading the protobuf package. I tried version 3.20.* and the issue was gone. You just need to add the following after the other package installation codes in the first code cell:
!pip install protobuf==3.20.*

Note that I myself needed to add this to all of the labs of this course. However, if I added this after I had already run the first cell, it did not work. In such cases, what I did was to kill all the kernels from the section “Running Terminals and Kernels” on the left side of the page, then add this line to the first cell and rerun the notebook from scratch. Sounds like a lot of effort, but, unfortunately, I didn’t find any other way around.

1 Like

Thanks a ton, Amir! It worked on my end.

1 Like

Hi Amir, you are a lifesaver! I came back to this after a month and now thanks to your fix, it works fine! Thank you so much!

1 Like

It worked for me here, thanks

1 Like