[issue36079] pdb on setuptools "ValueError: underlying buffer has been detached"
Gerrit Holl
report at bugs.python.org
Fri Feb 22 09:42:18 EST 2019
New submission from Gerrit Holl <gerrit.holl at gmail.com>:
I am unable to use `pdb` to debug a problem I have with the `python-hdf4` installer. The exception in the program to be debugged is printed twice, followed by an exception in pdb itself, ending with `ValueError: underlying buffer has been detached`. See below, in particular the lower part:
$ python -mpdb setup.py install
python -mpdb setup.py install
> /panfs/e/vol0/gholl/checkouts/python-hdf4/setup.py(11)<module>()
-> """
(Pdb) cont
running install
running bdist_egg
running egg_info
running build_src
build_src
building extension "pyhdf._hdfext" sources
build_src: building npy-pkg config files
writing python_hdf4.egg-info/PKG-INFO
writing dependency_links to python_hdf4.egg-info/dependency_links.txt
writing top-level names to python_hdf4.egg-info/top_level.txt
reading manifest file 'python_hdf4.egg-info/SOURCES.txt'
writing manifest file 'python_hdf4.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'pyhdf._hdfext' extension
compiling C sources
C compiler: gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-I/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/core/include -I/panfs/e/vol0/gholl/venv/py36/include -I/hpc/rhome/software/python/3.6.5/include/python3.6m -c'
extra options: '-DNOSZIP'
Traceback (most recent call last):
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1667, in main
pdb._runscript(mainpyfile)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1548, in _runscript
self.run(statement)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/bdb.py", line 434, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/panfs/e/vol0/gholl/checkouts/python-hdf4/setup.py", line 11, in <module>
"""
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/core.py", line 171, in setup
return old_setup(**new_attr)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/install.py", line 62, in run
r = self.setuptools_run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/install.py", line 56, in setuptools_run
self.do_egg_install()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/build_ext.py", line 261, in run
self.build_extensions()
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/build_ext.py", line 379, in build_extension
**kws)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 92, in <lambda>
m = lambda self, *args, **kw: func(self, *args, **kw)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 363, in CCompiler_compile
single_compile(o)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 305, in single_compile
if not _needs_build(obj, cc_args, extra_postargs, pp_opts):
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 64, in _needs_build
last_cmdline = lines[-1]
IndexError: list index out of range
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
Traceback (most recent call last):
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1667, in main
pdb._runscript(mainpyfile)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1548, in _runscript
self.run(statement)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/bdb.py", line 434, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/panfs/e/vol0/gholl/checkouts/python-hdf4/setup.py", line 11, in <module>
"""
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/core.py", line 171, in setup
return old_setup(**new_attr)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/install.py", line 62, in run
r = self.setuptools_run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/install.py", line 56, in setuptools_run
self.do_egg_install()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/build_ext.py", line 261, in run
self.build_extensions()
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/build_ext.py", line 379, in build_extension
**kws)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 92, in <lambda>
m = lambda self, *args, **kw: func(self, *args, **kw)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 363, in CCompiler_compile
single_compile(o)
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 305, in single_compile
if not _needs_build(obj, cc_args, extra_postargs, pp_opts):
File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 64, in _needs_build
last_cmdline = lines[-1]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1694, in <module>
pdb.main()
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1686, in main
pdb.interaction(None, t)
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 351, in interaction
self.print_stack_entry(self.stack[self.curindex])
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1453, in print_stack_entry
self.format_stack_entry(frame_lineno, prompt_prefix))
File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 453, in message
print(msg, file=self.stdout)
ValueError: underlying buffer has been detached
----------
messages: 336316
nosy: Gerrit.Holl
priority: normal
severity: normal
status: open
title: pdb on setuptools "ValueError: underlying buffer has been detached"
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36079>
_______________________________________
More information about the Python-bugs-list
mailing list