Closed mcquin closed 6 years ago
Maybe this is coming from sphinxcontrib:
> PYTHONWARNINGS='error::ImportWarning' pytest tests/test_munge.py
Traceback (most recent call last):
File "/usr/local/bin/pytest", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 49, in main
config = _prepareconfig(args, plugins)
File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 168, in _prepareconfig
pluginmanager=pluginmanager, args=args)
File "/usr/local/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "/usr/local/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/usr/local/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
_MultiCall(methods, kwargs, hook.spec_opts).execute()
File "/usr/local/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
return _wrapped_call(hook_impl.function(*args), self.execute)
File "/usr/local/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 250, in _wrapped_call
wrap_controller.send(call_outcome)
File "/usr/local/lib/python3.6/site-packages/_pytest/helpconfig.py", line 68, in pytest_cmdline_parse
config = outcome.get_result()
File "/usr/local/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
raise ex[1].with_traceback(ex[2])
File "/usr/local/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
self.result = func()
File "/usr/local/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
res = hook_impl.function(*args)
File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 957, in pytest_cmdline_parse
self.parse(args)
File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 1121, in parse
self._preparse(args, addopts=addopts)
File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 1082, in _preparse
self._consider_importhook(args)
File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 1027, in _consider_importhook
hook = _pytest.assertion.install_importhook(self)
File "/usr/local/lib/python3.6/site-packages/_pytest/assertion/__init__.py", line 77, in install_importhook
config._assertstate.hook = hook = rewrite.AssertionRewritingHook(config)
File "/usr/local/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 55, in __init__
self._register_with_pkg_resources()
File "/usr/local/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 236, in _register_with_pkg_resources
import pkg_resources
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3138, in <module>
@_call_aside
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3122, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3166, in _initialize_master_working_set
for dist in working_set
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3166, in <genexpr>
for dist in working_set
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2697, in activate
declare_namespace(pkg)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2257, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2177, in _handle_ns
loader = importer.find_module(packageName)
File "<frozen importlib._bootstrap_external>", line 426, in _find_module_shim
ImportWarning: Not importing directory /usr/local/lib/python3.6/site-packages/sphinxcontrib: missing __init__
UPDATE:
With a completely fresh install of Python 3.6:
PYTHONWARNINGS='error::ImportWarning' pytest tests/test_munge.py
=============================================================================== test session starts ===============================================================================
platform darwin -- Python 3.6.2, pytest-3.2.2, py-1.4.34, pluggy-0.4.0 -- /usr/local/opt/python3/bin/python3.6
cachedir: .cache
rootdir: /Users/mcquin/code/cytomining/cytominer-database, inifile: setup.cfg
collected 0 items / 1 errors
===================================================================================== ERRORS ======================================================================================
______________________________________________________________________ ERROR collecting tests/test_munge.py _______________________________________________________________________
tests/test_munge.py:8: in <module>
import pandas as pd
/usr/local/lib/python3.6/site-packages/pandas/__init__.py:26: in <module>
from pandas._libs import (hashtable as _hashtable,
/usr/local/lib/python3.6/site-packages/pandas/_libs/__init__.py:3: in <module>
from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
pandas/_libs/tslib.pyx:3: in init pandas._libs.tslib (pandas/_libs/tslib.c:117337)
???
E ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
UPDATE:
This is part of a known set of warnings and is being resolved: https://github.com/pandas-dev/pandas/issues/16481
It is rather alarming for the user. Perhaps we can suppress these messages.
UPDATE:
Some history:
The following message is printed when running
import cytominer_database.munge
:Python version: 3.6.2 Operating system: OS X, Windows 7 cytominer-database version: 0.0.1b3 and source