i was working on the code for a ldap authentification when i get suddenly an import error for ldap3-2.9.1 That is my code:
import os
import socket
import sys
sys.path.append('C:\\Users\\User\\Python\\modules\\')
sys.path.append('C:\\Users\\User\\Python\\modules\\ldap3-2.9.1\\')
import pyasn1
from ldap3 import Server, Connection, SUBTREE, LEVEL, ALL
Here is the Error:
========= RESTART: C:\Users\User\Python\pyproj\project1\myldap2.py =========
Traceback (most recent call last):
File "C:\Users\User\Python\pyproj\project1\myldap2.py", line 9, in <module>
from ldap3 import Server, Connection, SUBTREE, LEVEL, ALL
ImportError: cannot import name 'Server' from 'ldap3' (C:\Users\User\Python\pyproj\project1\ldap3.py)
I dont changed anything in the paths, folderstructure, module and so on. I dont installed something new, or restarted the computer between the working state and the import error. the only changes i made where in the code.
i did a forced reinstall of ldap3 but it does not help.
i hope anyone knows about that kind of error
For verifying the Error i use a minimal code. I dont get Errors for other modules.