You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running this code results in an immediate segfault. Specifying engine = 'python' does not, so presumably bad data is passed to the C engine. If test is a dict, set, or numpy.ndarray, a ValueError is raised as expected.
We discovered this error in a Snakemake rule, where the user passed input, which by default a list, directly to read_csv in a run block. Given Snakemake's popularity, this seems like something that could pop up fairly often.
Expected Behavior
It should raise a ValueError.
Installed Versions
My environment seems to break with this.
File ~/miniconda/envs/dissertation/lib/python3.8/site-packages/setuptools/init.py:8, in
5 import os
6 import re
----> 8 import _distutils_hack.override # noqa: F401
10 import distutils.core
11 from distutils.errors import DistutilsOptionError
File ~/miniconda/envs/dissertation/lib/python3.8/site-packages/_distutils_hack/override.py:1, in
----> 1 import('_distutils_hack').do_override()
File ~/miniconda/envs/dissertation/lib/python3.8/site-packages/_distutils_hack/init.py:71, in do_override()
69 if enabled():
70 warn_distutils_present()
---> 71 ensure_local_distutils()
File ~/miniconda/envs/dissertation/lib/python3.8/site-packages/_distutils_hack/init.py:59, in ensure_local_distutils()
57 # check that submodules load as expected
58 core = importlib.import_module('distutils.core')
---> 59 assert '_distutils' in core.file, core.file
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Running this code results in an immediate segfault. Specifying
engine = 'python'
does not, so presumably bad data is passed to the C engine. Iftest
is adict
,set
, ornumpy.ndarray
, aValueError
is raised as expected.We discovered this error in a Snakemake rule, where the user passed
input
, which by default a list, directly toread_csv
in arun
block. Given Snakemake's popularity, this seems like something that could pop up fairly often.Expected Behavior
It should raise a
ValueError
.Installed Versions
My environment seems to break with this.
File ~/miniconda/envs/dissertation/lib/python3.8/site-packages/setuptools/init.py:8, in
5 import os
6 import re
----> 8 import _distutils_hack.override # noqa: F401
10 import distutils.core
11 from distutils.errors import DistutilsOptionError
File ~/miniconda/envs/dissertation/lib/python3.8/site-packages/_distutils_hack/override.py:1, in
----> 1 import('_distutils_hack').do_override()
File ~/miniconda/envs/dissertation/lib/python3.8/site-packages/_distutils_hack/init.py:71, in do_override()
69 if enabled():
70 warn_distutils_present()
---> 71 ensure_local_distutils()
File ~/miniconda/envs/dissertation/lib/python3.8/site-packages/_distutils_hack/init.py:59, in ensure_local_distutils()
57 # check that submodules load as expected
58 core = importlib.import_module('distutils.core')
---> 59 assert '_distutils' in core.file, core.file
AssertionError: /home/camille/miniconda/envs/dissertation/lib/python3.8/distutils/core.py
The text was updated successfully, but these errors were encountered: