-
Notifications
You must be signed in to change notification settings - Fork 126
AttributeError: 'module' object has no attribute '_trace_level' #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am able to replicate this -- and came to post an issue -- but only when running Python with optimisations enabled (i.e., Steps to reproduce: In import ldap
ldap.initialize("ldap://my.ldap.host") Then at the command line:
This is with Python 3.6.5 on macOS 10.11.6, with python-ldap 3.1.0 |
All use of these attributes *should* be guarded by `if __debug__`. However, that's not always the case. Providing different API based on __debug__ is unnecessarily fragile. This is intended as a quick fix for a maintenance release. Fixes: python-ldap#226
All use of these attributes *should* be guarded by `if __debug__`. However, that's not always the case. Providing different API based on __debug__ is unnecessarily fragile. This is intended as a quick fix for a maintenance release. Fixes: python-ldap#226
All use of these attributes *should* be guarded by `if __debug__`. However, that's not always the case. Providing different API based on __debug__ is unnecessarily fragile. This is intended as a quick fix for a maintenance release. Fixes: python-ldap#226
See python-ldap/python-ldap#226 Signed-off-by: Michal Čihař <michal@cihar.com>
See python-ldap/python-ldap#226 Signed-off-by: Michal Čihař <michal@cihar.com>
I am facing the same issue on windows machine with python v3.7.2 and python-ldap 3.1.0 python_ldap-2.5.2-cp27-cp27m-win_amd64.whl is not a supported wheel on this plat |
Pull request #234 should fix the problem. I'd be grateful if you could check if the change fixes the issue. |
I find it a bit scary that, once __debug __ is off (which should be in prod) and this very argument is not passed, the app simply fails when initializing a connection. As a quick workaround I recommend passing pretty much anything as trace_level when initializing connection - as long as the value does not evaluate to False. '0' would be a good example - although this will crash under __debug __. For prod:
For debug:
|
Again: Pull request #234 should fix the problem. |
Uh oh!
There was an error while loading. Please reload this page.
Issue description:
After an upgrade from 3.0.0 to 3.1.0 I cannot login into my review board as the ldap module throws an error. After an downgrade everything works fine.
Steps to reproduce:
Operating system: Linux
Python version: 2.7.14
python-ldap version: 3.1.0 and 3.0.0
The text was updated successfully, but these errors were encountered: