How to convert a base64 user ID to an object friendly string

Hey there. I am having the same issue as this person, but when I do his solution, I get a namespace error:

‘accounts’ is not a registered namespace

I see it is receiving the information from the activation link but on this code:

uid = force_str(urlsafe_base64_decode(uidb64))

it gives the error:

Field ‘id’ expected a number but got b’<property object at 0x000002553FA59DA0>'.

The above exception (invalid literal for int() with base 10: b’<property object at 0x000002553FA59DA0>') was the direct cause of the following exception:

Any help would be greatly appreciated.

Ok, I looked at it again and I had the correct account_activation_email.html with the uidb64=uid, but did not have the users, I am using accounts, and when I do this I get the namespace issue.

###################################################################
Added namespace accounts

This is accounts/urls

app_name = ‘accounts’

urlpatterns = [
path(‘signup/str:alias_name’, views.SignUpView.as_view(), name=‘signup.html’),
path(‘activate///’, views.activate, name=‘activate’),
path(‘account_activation_sent/’, views.account_activation_sent, name=‘account_activation_sent’),
path(‘account_activation_complete/’, views.account_activation_complete, name=‘account_activation_complete’),

Error:
Reverse for ‘account_activation_sent’ not found. ‘account_activation_sent’ is not a valid view function or pattern name.