New submission from Jeroen Van Goey: I installed Python 3.6 from J Fernyhough's PPA by doing
sudo add-apt-repository ppa:jonathonf/python-3.6 sudo apt-get update sudo apt-get install python3.6 I made a string, using the new literal string interpolation, but I supplied an invalid format specifier. I not only got the expected "ValueError: Invalid format specifier", but also the unexpected "ModuleNotFoundError: No module named 'apt_pkg'". $ python3.6 Python 3.6.0 (default, Dec 29 2016, 21:40:36) [GCC 5.4.1 20161202] on linux Type "help", "copyright", "credits" or "license" for more information. >>> value = 4 * 20 >>> f'the value is {value:%A}' Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: Invalid format specifier 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 23, 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> ValueError: Invalid format specifier ---------- messages: 285716 nosy: jeroen-vangoey priority: normal severity: normal status: open title: ModuleNotFoundError when using literal string interpolation with invalid format specifier type: behavior versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29307> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com