Description of problem: pysnmp does not list python-asn1 as a dependency. Thus the pysnmp sample code at http://pysnmp.sourceforge.net/docs/4.x/ demonstrating a SNMP Get fails. This code begins with from pysnmp.entity.rfc3413.oneliner import cmdgen That line causes a failure until python-pyasn1 is manually installed. Version-Release number of selected component (if applicable): $ rpm --query pysnmp pysnmp-4.1.14-2.a.fc15.noarch How reproducible: Install pysnmp and attempt to use it in python code. Steps to Reproduce: 1. sudo yum install pysnmp 2. python 3. from pysnmp.entity.rfc3413.oneliner import cmdgen Actual results: $ python Python 2.7.1 (r271:86832, Apr 12 2011, 16:15:16) [GCC 4.6.0 20110331 (Red Hat 4.6.0-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pysnmp.entity.rfc3413.oneliner import cmdgen Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 2, in <module> from pysnmp.entity import engine, config File "/usr/lib/python2.7/site-packages/pysnmp/entity/engine.py", line 2, in <module> from pysnmp.proto.rfc3412 import MsgAndPduDispatcher File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc3412.py", line 3, in <module> from pysnmp.smi import builder, instrum File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 4, in <module> from pysnmp.smi import error File "/usr/lib/python2.7/site-packages/pysnmp/smi/error.py", line 1, in <module> from pyasn1.error import PyAsn1Error ImportError: No module named pyasn1.error Expected results: pysnmp imports without error and pysnmp sample code works. Additional info: The package python-pyasn1 is not listed as a dependency of the package pysnmp. $ rpm --query --requires pysnmp /bin/sh /usr/bin/python net-snmp python(abi) = 2.7 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsXz) <= 5.2-1 As a workaround, manually install python-pyasn1: $ sudo yum install python-pyasn1
pysnmp-4.2.2-1.rc1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/pysnmp-4.2.2-1.rc1.fc16
Package pysnmp-4.2.2-1.rc1.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing pysnmp-4.2.2-1.rc1.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-16447/pysnmp-4.2.2-1.rc1.fc16 then log in and leave karma (feedback).
Hi Fabian, Is there an updated pyasn1 as well? I get unhappiness when testing just the release candidate RPM (I had to download it from the build system as it isn't on the mirrors yet). Running F15 with current updates. # yum remove pysnmp python-pyasn1 # yum localinstall pysnmp-4.2.2-1.rc1.fc16.noarch.rpm Installed: pysnmp.noarch 0:4.2.2-1.rc1.fc16 Dependency Installed: python- pyasn1.noarch 0:0.0.12a-2.fc15 Applying the test case: $ python Python 2.7.1 (r271:86832, Apr 12 2011, 16:15:16) [GCC 4.6.0 20110331 (Red Hat 4.6.0-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pysnmp.entity.rfc3413.oneliner import cmdgen Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 2, in <module> from pysnmp.entity import engine, config File "/usr/lib/python2.7/site-packages/pysnmp/entity/engine.py", line 2, in <module> from pysnmp.proto.rfc3412 import MsgAndPduDispatcher File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc3412.py", line 3, in <module> from pyasn1.compat.octets import null ImportError: No module named compat.octets It's quite possible I'm doing something silly, since I'm a network engineer more than a a Python programmer or Fedora hacker. Thanks, Glen
python-pyasn1 0.1.2 is only available for > F16. For me, it's working.
Apologies, I'd failed to see that Fedora 16 had released during the life of this bug. I'll do a clean install on a VM and test.