Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importing the package gives error. #1

Closed
DumbMachine opened this issue May 1, 2019 · 2 comments
Closed

importing the package gives error. #1

DumbMachine opened this issue May 1, 2019 · 2 comments

Comments

@DumbMachine
Copy link

Import the package gives the following error:

TypeError: __call__() got an unexpected keyword argument 'warn_on_impl'

Full traceback:

ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

Traceback (most recent call last):
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3296, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-65ec2da39b2a>", line 1, in <module>
    import pixel_art
  File "C:\Users\ratin\Downloads\draw-canvas-rxjs\pixel_art\pixel_art\__init__.py", line 2, in <module>
    from .color_utils import get_dominant_color_paths as get_icon_colors
  File "C:\Users\ratin\Downloads\draw-canvas-rxjs\pixel_art\pixel_art\color_utils.py", line 5, in <module>
    from sklearn.cluster import KMeans
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\cluster\__init__.py", line 6, in <module>
    from .spectral import spectral_clustering, SpectralClustering
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\cluster\spectral.py", line 15, in <module>
    from ..metrics.pairwise import pairwise_kernels
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\metrics\__init__.py", line 7, in <module>
    from .ranking import auc
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\metrics\ranking.py", line 36, in <module>
    from ..preprocessing import label_binarize
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\preprocessing\__init__.py", line 6, in <module>
    from ._function_transformer import FunctionTransformer
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\preprocessing\_function_transformer.py", line 5, in <module>
    from ..utils.testing import assert_allclose_dense_sparse
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\utils\testing.py", line 751, in <module>
    import pytest
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\pytest.py", line 8, in <module>
    from _pytest.config import cmdline
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\_pytest\config\__init__.py", line 23, in <module>
    import _pytest.hookspec  # the extension point definitions
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\_pytest\hookspec.py", line 503, in <module>
    @hookspec(historic=True, warn_on_impl=PYTEST_LOGWARNING)
TypeError: __call__() got an unexpected keyword argument 'warn_on_impl'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2033, in showtraceback
    stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1095, in get_records
    return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 313, in wrapped
    return f(*args, **kwargs)
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 347, in _fixed_getinnerframes
    records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 1502, in getinnerframes
    frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 1460, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 696, in getsourcefile
    if getattr(getmodule(object, filename), '__loader__', None) is not None:
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 733, in getmodule
    if ismodule(module) and hasattr(module, '__file__'):
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\py\_vendored_packages\apipkg.py", line 195, in __getattribute__
    return getattr(getmod(), name)
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\py\_vendored_packages\apipkg.py", line 179, in getmod
    x = importobj(modpath, None)
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\py\_vendored_packages\apipkg.py", line 69, in importobj
    module = __import__(modpath, None, None, ['__doc__'])
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\pytest.py", line 8, in <module>
    from _pytest.config import cmdline
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\_pytest\config\__init__.py", line 23, in <module>
    import _pytest.hookspec  # the extension point definitions
  File "C:\Users\ratin\AppData\Local\Continuum\anaconda3\lib\site-packages\_pytest\hookspec.py", line 503, in <module>
    @hookspec(historic=True, warn_on_impl=PYTEST_LOGWARNING)
TypeError: __call__() got an unexpected keyword argument 'warn_on_impl'
----------------------------------
@AdamSpannbauer
Copy link
Owner

I cannot reproduce the error using a fresh virtualenv.

Steps taken to reproduce (from inside dir of cloned repo):

(venv) >pip install . --quiet
(venv) >pip install opencv-contrib-python --quiet
(venv) >python
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pixel_art
>>> 

Based on this issue related to your error message you might want to try upgrading pytest & its dependencies to solve the issue.

@DumbMachine
Copy link
Author

Thanks for the prompt reply. My bad, I didn't try upgrading the dependencies.
The following helped solve the issue;

pip install --upgrade pytest

I'm closing the issue. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants