Createuser error, v12.13.2

Hi,

I’m having issues creating a user. I send the following command:

cryosparcm createuser --email testemail@test.com --password testPass123 --name “Hill”
Creating user Hill with email: testemail@test.com password: testPass123
Traceback (most recent call last):
File “/home/cryosparc2/cryosparc2_master/deps/anaconda/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/home/cryosparc2/cryosparc2_master/deps/anaconda/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/cryosparc2/cryosparc2_master/cryosparc2_compute/client.py”, line 83, in
print eval(“cli.”+command)
File “”, line 1, in
File “/home/cryosparc2/cryosparc2_master/cryosparc2_compute/client.py”, line 57, in func
assert False, res[‘error’]
AssertionError: {u’message’: u"OtherError: ‘emails’", u’code’: 500, u’data’: None, u’name’: u’OtherError’}

Here’s the command_core log output:

[JSONRPC ERROR 2020-02-06 13:25:31.934152 at create_user ]

Traceback (most recent call last):
File “cryosparc2_command/command_core/init.py”, line 114, in wrapper
res = func(*args, **kwargs)
File “cryosparc2_command/command_core/init.py”, line 492, in create_user
if email in [user[‘emails’][0][‘address’] for user in users]:
KeyError: ‘emails’

This email hasn’t been used. I’m not sure what’s going wrong. Any help is appreciated, thanks.

Hi @shockacone,

Can you enclose all arguments to the createuser function with quotations?

Please see below:

cryosparc2@semcworkshop:~$ cryosparcm createuser --email "testemail@test.com" --password “testPass123” --name “Hill”
Creating user Hill with email: testemail@test.com password: testPass123
Traceback (most recent call last):
File “/home/cryosparc2/cryosparc2_master/deps/anaconda/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/home/cryosparc2/cryosparc2_master/deps/anaconda/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/cryosparc2/cryosparc2_master/cryosparc2_compute/client.py”, line 83, in
print eval(“cli.”+command)
File “”, line 1, in
File “/home/cryosparc2/cryosparc2_master/cryosparc2_compute/client.py”, line 57, in func
assert False, res[‘error’]
AssertionError: {u’message’: u"OtherError: ‘emails’", u’code’: 500, u’data’: None, u’name’: u’OtherError’}

I will mention that this function works on our other installations. I don’t know why but this one is acting up. Thank you.

Hi @shockacone,

Are you on the latest version of cryoSPARC? If you are, there is a new way to add users.
Please see this tutorial for instructions:

Hi,

Thanks for this solution. I will try it out. We get new users all the time and need a way to automate this. Is there a cli tool that we can use in our scripts?

Thanks -Shaker

Hi @shockacone,

I’m going to send you a private message because it seems that in this process, a malformed user has inadvertently been created in your instance; I’ll need some more information to debug this.

In general, both methods of creating a new user (through the CLI and web application) should work

- Suhail