You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First line of that function causes this traceback:
modpython: <no user>/httpadmin/OnWebPreRequest failed: Traceback (most recent call last):
File "/home/darren/.znc/modules/httpadmin.py", line 91, in OnWebPreRequest
http_headers = WebSock.m_msHeaders
File "/usr/lib/znc/modpython/znc_core.py", line 6569, in <lambda>
__getattr__ = lambda self, name: _swig_getattr(self, CWebSock, name)
File "/usr/lib/znc/modpython/znc_core.py", line 74, in _swig_getattr
return _swig_getattr_nondynamic(self, class_type, name, 0)
File "/usr/lib/znc/modpython/znc_core.py", line 69, in _swig_getattr_nondynamic
return object.__getattr__(self, name)
AttributeError: type object 'object' has no attribute '__getattr__'
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29561929-modpython-throws-an-attributeerror-when-trying-to-read-web-request-headers?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
The text was updated successfully, but these errors were encountered:
Here is the exception from the original script, but alas the same issue it looks like:
Traceback (most recent call last):
File "/home/znc/.znc/modules/api.py", line 98, in OnWebPreRequest
if mod_blockuser.HasNV(users[name].GetUserName()):
File "/home/znc/znc/modules/modpython/znc_core.py", line 3689, in <lambda>
__getattr__ = lambda self, name: _swig_getattr(self, CModule, name)
File "/home/znc/znc/modules/modpython/znc_core.py", line 74, in _swig_getattr
return _swig_getattr_nondynamic(self, class_type, name, 0)
File "/home/znc/znc/modules/modpython/znc_core.py", line 69, in _swig_getattr_nondynamic
return object.__getattr__(self, name)
AttributeError: type object 'object' has no attribute '__getattr__'
I'm receiving this as of the latest 1.6.3 source tar.gz, manually compiled.
Looks like my issue may not be 100% related. I was able to track down that it looks like CModule::HasNV was removed sometime before and/or up to 1.6.3, and now CModule::ExistsNV has taken it's place. I am not seeing that the documentation on this matter has been properly updated, as I had to scramble through the c++ source to find it.
Python module snippet:
First line of that function causes this traceback:
The text was updated successfully, but these errors were encountered: