ZhangHuangbin wrote:Seems mlmmjadmin service is not running?
Try to create a testing mailing list account with /opt/mlmmjadmin/tools/maillist_admin.py script, then remove it. This way we can verify it's working or not.
The list gets created and deleted OK but cant edit or enter the list via the web admin.
I get this:
[root@mail tools]# python3 maillist_admin.py create list@dmain.net only_subscriber_can_post=yes disable_archive=no
Traceback (most recent call last):
File "maillist_admin.py", line 140, in <module>
_json = r.json()
File "/usr/lib/python3.6/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib64/python3.6/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib64/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[root@mail tools]# python3 maillist_admin.py delete list@domain.net
Traceback (most recent call last):
File "maillist_admin.py", line 169, in <module>
_json = r.json()
File "/usr/lib/python3.6/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib64/python3.6/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib64/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I also see this in the log file: when I try to enter the list via the manager
Nov 17 08:06:56 localhost mlmmjadmin[1704]: Traceback (most recent call last):#012 File "/usr/lib/python2.7/site-packages/web/application.py", line 290, in process#012 return self.handle()#012 File "/usr/lib/python2.7/site-packages/web/application.py", line 281, in handle#012 return self._delegate(fn, self.fvars, args)#012 File "/usr/lib/python2.7/site-packages/web/application.py", line 527, in _delegate#012 mod = __import__(mod, None, None, [""])#012 File "/opt/mlmmjadmin-3.0.4/controllers/profile.py", line 3, in <module>#012 from controllers.decorators import api_acl#012 File "/opt/mlmmjadmin-3.0.4/controllers/decorators.py", line 3, in <module>#012 from libs.utils import get_auth_token, api_render#012 File "/opt/mlmmjadmin-3.0.4/libs/utils.py", line 12#012 def str2bytes(s) -> bytes:#012 ^#012SyntaxError: invalid syntax
Nov 17 08:06:56 localhost mlmmjadmin[1704]:
Nov 17 08:06:56 localhost mlmmjadmin[1704]: [127.0.0.1] GET /api/list@domain.net 500 84 "-"
and this:
Nov 17 08:11:13 localhost mlmmjadmin[1704]: Traceback (most recent call last):#012 File "/usr/lib/python2.7/site-packages/web/application.py", line 290, in process#012 return self.handle()#012 File "/usr/lib/python2.7/site-packages/web/application.py", line 281, in handle#012 return self._delegate(fn, self.fvars, args)#012 File "/usr/lib/python2.7/site-packages/web/application.py", line 527, in _delegate#012 mod = __import__(mod, None, None, [""])#012 File "/opt/mlmmjadmin-3.0.4/controllers/profile.py", line 3, in <module>#012 from controllers.decorators import api_acl#012 File "/opt/mlmmjadmin-3.0.4/controllers/decorators.py", line 3, in <module>#012 from libs.utils import get_auth_token, api_render#012 File "/opt/mlmmjadmin-3.0.4/libs/utils.py", line 12#012 def str2bytes(s) -> bytes:#012 ^#012SyntaxError: invalid syntax
Nov 17 08:11:13 localhost mlmmjadmin[1704]:
Nov 17 08:11:13 localhost mlmmjadmin[1704]: [127.0.0.1] DELETE /api/list@domain.net 500 84 "-"
Note: python2.7 in the above cmd
try to set the default python with the cmd below but nothing changes:
alternatives --set python /usr/bin/python3
[root@mail tools]# python --version
Python 3.6.8