I’ve never seen this error on my machine, but searching for it it looks like Python 3.7 could fix this issue.
Would it be possible for you to create a new conda environment and try the code with Python 3.7?
If not, could you post a code snippet so that we can reproduce this error?