Skip to content
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

AttributeError: 'module' object has no attribute 'noValue' #69

Closed
ww9rivers opened this issue Jul 21, 2017 · 4 comments
Closed

AttributeError: 'module' object has no attribute 'noValue' #69

ww9rivers opened this issue Jul 21, 2017 · 4 comments

Comments

@ww9rivers
Copy link

I'm getting this error with both 4.3.5 and 4.3.8. Python version is 2.7.13

Below is a stack trace from a simple app that I wrote which uses pysnmp to read SNMP data (Sorry for the layout -- I tried to insert them as code but that doesn't seem to work):

Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/app/empf/lib/python/monitor-0.1.0-py2.7.egg/monitor/__main__.py", line 22, in <module> app() File "/app/lib/python/monitor-0.1.0-py2.7.egg/monitor/matrix.py", line 115, in __call__ result = self.run(job) File "/app/lib/python/monitor-0.1.0-py2.7.egg/monitor/matrix.py", line 48, in run mod = __import__('monitor.'+job.type, fromlist=[job.type], level=1) File "/app/lib/python/monitor-0.1.0-py2.7.egg/monitor/AsyncSNMPv1.py", line 16, in <module> from pysnmp.entity.rfc3413.oneliner import cmdgen File "/app/lib/python/gevent-1.2.1-py2.7-linux-x86_64.egg/gevent/builtins.py", line 93, in __import__ result = _import(*args, **kwargs) File "/usr/lib/python2.7/site-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 10, in <module> from pysnmp.hlapi.asyncore import * File "/app/lib/python/gevent-1.2.1-py2.7-linux-x86_64.egg/gevent/builtins.py", line 93, in __import__ result = _import(*args, **kwargs) File "/usr/lib/python2.7/site-packages/pysnmp/hlapi/__init__.py", line 7, in <module> from pysnmp.proto.rfc1902 import * File "/app/lib/python/gevent-1.2.1-py2.7-linux-x86_64.egg/gevent/builtins.py", line 93, in __import__ result = _import(*args, **kwargs) File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1902.py", line 563, in <module> class Bits(OctetString): File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1902.py", line 614, in Bits def __init__(self, value=univ.noValue, tagSet=None, subtypeSpec=None, AttributeError: 'module' object has no attribute 'noValue'

@etingof
Copy link
Owner

etingof commented Jul 21, 2017

What is your pyasn1 version? Make sure it's the latest released one.

@ww9rivers
Copy link
Author

$ pip search pyasn1
pyasn1-modules (0.0.9)  - A collection of ASN.1-based protocols modules.
pyasn1 (0.2.3)          - ASN.1 types and codecs
  INSTALLED: 0.2.3 (latest)
rfc3161 (1.0.7)         - Python implementation of the RFC3161 specification, using pyasn1

@ww9rivers
Copy link
Author

Sorry, my bad! I forgot to check the OS installation of the package.

I removed the OS python-pyasn1 package and reinstalled everything. It works now.

Thank you for your quick response.

@etingof
Copy link
Owner

etingof commented Jul 21, 2017

Note to self: we should probably rely on the older pyasn1 API to avoid this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants