Message166163
Two "easy" ways to get tracebacks which contain useless importlib._bootstrap rows:
- When there is a syntax error in the imported module
- On "import package.module", when top-level package cannot be imported
$ ./python -c "import foo"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 1421, in _find_and_load
File "<frozen importlib._bootstrap>", line 1388, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 527, in _check_name_wrapper
File "<frozen importlib._bootstrap>", line 899, in load_module
File "<frozen importlib._bootstrap>", line 880, in load_module
File "<frozen importlib._bootstrap>", line 503, in module_for_loader_wrapper
File "<frozen importlib._bootstrap>", line 744, in _load_module
File "<frozen importlib._bootstrap>", line 857, in get_code
File "./foo.py", line 1
invalid syntax
^
SyntaxError: invalid syntax
$ ./python
Python 3.3.0b1 (default:afdb0e1a9dac+, Jul 19 2012, 23:55:02)
[GCC 4.4.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import _sqlite3
>>> del _sqlite3.register_converter
>>> import sqlite3.dump
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 1421, in _find_and_load
File "<frozen importlib._bootstrap>", line 1372, in _find_and_load_unlocked
File "/home/amauryfa/python/cpython3.x/Lib/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/home/amauryfa/python/cpython3.x/Lib/sqlite3/dbapi2.py", line 83, in <module>
register_adapters_and_converters()
File "/home/amauryfa/python/cpython3.x/Lib/sqlite3/dbapi2.py", line 80, in register_adapters_and_converters
register_converter("date", convert_date)
NameError: global name 'register_converter' is not defined |
|
Date |
User |
Action |
Args |
2012-07-22 20:07:02 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, brett.cannon, pitrou |
2012-07-22 20:07:02 | amaury.forgeotdarc | set | messageid: <1342987622.49.0.633292920923.issue15425@psf.upfronthosting.co.za> |
2012-07-22 20:07:01 | amaury.forgeotdarc | link | issue15425 messages |
2012-07-22 20:07:01 | amaury.forgeotdarc | create | |
|