[Bug 2080995] Re: Warnings on installation and traceback when run
Ubuntu Foundations Team Bug Bot
2080995 at bugs.launchpad.net
Thu Oct 3 12:29:49 UTC 2024
The attachment "fix.patch" seems to be a patch. If it isn't, please
remove the "patch" flag from the attachment, remove the "patch" tag, and
if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]
** Tags added: patch
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-pysnmp4 in Ubuntu.
https://bugs.launchpad.net/bugs/2080995
Title:
Warnings on installation and traceback when run
Status in python-pysnmp4 package in Ubuntu:
Confirmed
Bug description:
Release:
$ lsb_release -rd
No LSB modules are available.
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Package version:
$ apt-cache policy python3-pysnmp4
python3-pysnmp4:
Installed: 4.4.12-2
Candidate: 4.4.12-2
Version table:
*** 4.4.12-2 500
500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
500 http://archive.ubuntu.com/ubuntu noble/universe i386 Packages
100 /var/lib/dpkg/status
Expected behavior:
Installation of a usable package.
Actual behavior:
Multiple warnings on installation and failure when attempting to import. See below.
Installing gives the following warnings:
Preparing to unpack .../python3-pysnmp4_4.4.12-2_all.deb ...
Unpacking python3-pysnmp4 (4.4.12-2) ...
Setting up python3-pysnmp4 (4.4.12-2) ...
/usr/lib/python3/dist-packages/pysnmp/hlapi/asyncio/cmdgen.py:61: SyntaxWarning: invalid escape sequence '\*'
"""Creates a generator to perform SNMP GET query.
/usr/lib/python3/dist-packages/pysnmp/hlapi/asyncio/cmdgen.py:168: SyntaxWarning: invalid escape sequence '\*'
"""Creates a generator to perform SNMP SET query.
/usr/lib/python3/dist-packages/pysnmp/hlapi/asyncio/cmdgen.py:275: SyntaxWarning: invalid escape sequence '\*'
"""Creates a generator to perform SNMP GETNEXT query.
/usr/lib/python3/dist-packages/pysnmp/hlapi/asyncio/cmdgen.py:388: SyntaxWarning: invalid escape sequence '\*'
"""Creates a generator to perform SNMP GETBULK query.
/usr/lib/python3/dist-packages/pysnmp/hlapi/asyncio/ntforg.py:36: SyntaxWarning: invalid escape sequence '\*'
"""Creates a generator to send SNMP notification.
/usr/lib/python3/dist-packages/pysnmp/hlapi/asyncore/cmdgen.py:25: SyntaxWarning: invalid escape sequence '\*'
"""Performs SNMP GET query.
/usr/lib/python3/dist-packages/pysnmp/hlapi/asyncore/cmdgen.py:138: SyntaxWarning: invalid escape sequence '\*'
"""Performs SNMP SET query.
/usr/lib/python3/dist-packages/pysnmp/hlapi/asyncore/cmdgen.py:249: SyntaxWarning: invalid escape sequence '\*'
"""Performs SNMP GETNEXT query.
/usr/lib/python3/dist-packages/pysnmp/hlapi/asyncore/cmdgen.py:362: SyntaxWarning: invalid escape sequence '\*'
When importing to a python program I get the following:
$ python3
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysnmp.hlapi import *
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pysnmp/smi/builder.py", line 18, in <module>
PY_MAGIC_NUMBER = importlib.util.MAGIC_NUMBER
^^^^^^^^^^^^^^
AttributeError: module 'importlib' has no attribute 'util'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pysnmp/smi/builder.py", line 23, in <module>
raise ImportError()
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/pysnmp/hlapi/__init__.py", line 9, in <module>
from pysnmp.smi.rfc1902 import *
File "/usr/lib/python3/dist-packages/pysnmp/smi/rfc1902.py", line 10, in <module>
from pysnmp.smi.builder import ZipMibSource
File "/usr/lib/python3/dist-packages/pysnmp/smi/builder.py", line 26, in <module>
import imp
ModuleNotFoundError: No module named 'imp'
>>>
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-pysnmp4/+bug/2080995/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list