How can i add administrator again

hi ,
i delete all user in tabuser ,
and add new user with a script from an csv file …
i try to insert the admin user with to database but it’s not working !!

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 52, in application
init_request(request)
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 114, in init_request
frappe.local.http_request = frappe.auth.HTTPRequest()
File “/home/frappe/frappe-bench/apps/frappe/frappe/auth.py”, line 48, in init
frappe.local.login_manager = LoginManager()
File “/home/frappe/frappe-bench/apps/frappe/frappe/auth.py”, line 114, in init
self.set_user_info()
File “/home/frappe/frappe-bench/apps/frappe/frappe/auth.py”, line 135, in set_user_info
self.full_name = " ".join(filter(None, [self.info.first_name,
AttributeError: ‘NoneType’ object has no attribute ‘first_name’

1 Like

I guess insert directly in the data base then!

Never do that!

1 Like

thank you, delete both of tabUser and tabUserRole ,
and get a the tables from other site database i have , and put them in the first one >>
i will never do that again it works now, thank you very much remhta