Error on Building Neo4j Applications with Python Project register user

I'm progressing through the Graph Academy module with Python and on this part:

https://graphacademy.neo4j.com/courses/app-python/2-interacting/5-registering/
Which is about registering users I implemented the code and hit this error:

> return jwt.encode(
payload,
self.jwt_secret,
algorithm='HS256'
).decode('ascii')
E AttributeError: 'str' object has no attribute 'decode'

I did a google search on this as I'm not familiar with jwt at all and this stack overflow thread:

https://stackoverflow.com/questions/65798281/attributeerror-str-object-has-no-attribute-decode-python-error
Has a useful comment about not needing to decode the token so all I did was remove the .decode('ascii') part and it worked for me. I don't know if this is an environmental thing but wanted to post this in case others hit this issue and don't know what to do - I don't know enough to tell if the repo for this course needs an update or not.

Thanks for posting this @nicksandel, the unnecessary decode() call is no longer in the main and 01-connect-to-neo4j branches.