I tried this and it worked. I didn't need to get pip because I already
had it, but that's okay, I construe it as an "abundance of caution" step
and I commend you.
BEFORE:
```
>>> dir(rdatatype)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'rdatatype' is not defined
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in
apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in
<module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
<module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
<module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24,
in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
<module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'rdatatype' is not defined
>>>
```
After:
```
>>> dir(rdatatype)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'rdatatype' is not defined
>>>
```
IMHO, you have the correct fix for this issue. You probably already
knew that.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1631367
Title:
Error in sys.excepthook: ModuleNotFoundError: No module named
'apt_pkg'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3.6/+bug/1631367/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs