Hello,
After apply modification in pro.py, we have still an error :
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/seafile/seafile-server-latest/pro/python/seafevents/ldap_syncer/run_ldap_sync.py", line 7, in <module>
from ldap import SCOPE_SUBTREE
ModuleNotFoundError: No module named 'ldap'
root@seafile1:/srv/seafile/seafile-server-latest# ./pro/pro.py ldapsync --test
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/srv/seafile/seafile-pro-server-7.1.7/pro/python/seafevents/ldap_syncer/run_ldap_sync.py", line 7, in <module>
from ldap import SCOPE_SUBTREE
ModuleNotFoundError: No module named 'ldap'
root@seafile1:/srv/seafile/seafile-server-latest# pip3 list | grep ldap
python3-ldap 0.9.8.4
Also worth mentioning that python3-ldap has changed name to ldap3, as per description here.
The issue is still present;
root@seafile1:/srv/seafile/seafile-server-latest# ./pro/pro.py ldapsync --test
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/srv/seafile/seafile-pro-server-7.1.7/pro/python/seafevents/ldap_syncer/run_ldap_sync.py", line 7, in <module>
from ldap import SCOPE_SUBTREE
ModuleNotFoundError: No module named 'ldap'
root@seafile1:/srv/seafile/seafile-server-latest# pip3 list | grep ldap
ldap3 2.8.1
python3-ldap 0.9.8.4
The current code is only compatible with ldap library instead of the new name “ldap3”. You can still use pip to install python-ldap library for python 3.7.