Napari: Mac OSX console test fail

Created on 1 Dec 2020  路  1Comment  路  Source: napari/napari

馃悰 Bug

We're currently getting a mac osx CI fail with the console, see https://github.com/napari/napari/runs/1481425431

make_test_viewer = <function make_test_viewer.<locals>.actual_factory at 0x7fdce7262200>
    def test_qt_viewer_with_console(make_test_viewer):
        """Test instantiating console from viewer."""
        viewer = make_test_viewer()
        view = viewer.window.qt_viewer
        # Check no console is present before it is requested
        assert view._console is None
        # Check console is created when requested
>       assert view.console is not None
napari/_qt/_tests/test_qt_viewer.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
napari/_qt/qt_viewer.py:309: in console
    self.console = QtConsole({'viewer': self.viewer})
napari/_qt/widgets/qt_console.py:77: in __init__
    kernel_manager.start_kernel(show_banner=False)
/Users/anka/conda/lib/python3.7/site-packages/ipykernel/inprocess/manager.py:46: in start_kernel
    self.kernel = InProcessKernel(parent=self, session=self.session)
/Users/anka/conda/lib/python3.7/site-packages/ipykernel/inprocess/ipkernel.py:72: in __init__
    super(InProcessKernel, self).__init__(**traits)
/Users/anka/conda/lib/python3.7/site-packages/ipykernel/ipkernel.py:85: in __init__
    import appnope
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
name = 'appnope'
args = ({'Any': <class 'traitlets.traitlets.Any'>, 'Bool': <class 'traitlets.traitlets.Bool'>, 'CommManager': <class 'ipykernel.comm.manager.CommManager'>, 'IPythonKernel': <class 'ipykernel.ipkernel.IPythonKernel'>, ...}, None, None, 0)
kwargs = {}
calling_frame = <frame at 0x7fdcdfbfb840, file '/Users/anka/conda/lib/python3.7/site-packages/ipykernel/ipkernel.py', line 85, code __init__>
_cf = <frame at 0x7fdcdfbfb840, file '/Users/anka/conda/lib/python3.7/site-packages/ipykernel/ipkernel.py', line 85, code __init__>
importing_module = 'ipykernel.ipkernel', existing = -1, flag = -1
    def _import(name, *args, **kwargs):
        # PYSIDE-1368: The `__name__` attribute does not need to exist in all modules.
        # PYSIDE-1398: sys._getframe(1) may not exist when embedding.
        calling_frame = _cf = sys._getframe().f_back
        importing_module = _cf.f_globals.get("__name__", "__main__") if _cf else "__main__"
        existing = pyside_feature_dict.get(importing_module, 0)
        if name == "__feature__" and args[2]:
            __init__()
            # This is an `import from` statement that corresponds to `IMPORT_NAME`.
            # The following `IMPORT_FROM` will handle errors. (Confusing, ofc.)
            flag = 0
            for feature in args[2]:
                if feature in _really_all_feature_names:
                    flag |= globals()[feature]
                else:
                    raise SyntaxError("PySide feature {} is not defined".format(feature))
            flag |= existing & 255 if isinstance(existing, int) and existing >= 0 else 0
            pyside_feature_dict[importing_module] = flag
            if importing_module == "__main__":
                # We need to add all modules here which should see __feature__.
                pyside_feature_dict["rlcompleter"] = flag
            # Initialize feature (multiple times allowed) and clear cache.
            sys.modules["PySide2.QtCore"].__init_feature__()
            return sys.modules["__feature__"]
        if name.split(".")[0] == "PySide2":
            # This is a module that imports PySide2.
            flag = existing if isinstance(existing, int) else 0
        else:
            # This is some other module. Ignore it in switching.
            flag = -1
        pyside_feature_dict[importing_module] = flag
>       return original_import(name, *args, **kwargs)
E       ModuleNotFoundError: No module named 'appnope'
bug tests

Most helpful comment

11 hours ago there was yanked release of appnope 0.1.1
5 hour ago there was release 0.1.2

https://pypi.org/project/appnope/#history

So this reason of faliture is rather solved

>All comments

11 hours ago there was yanked release of appnope 0.1.1
5 hour ago there was release 0.1.2

https://pypi.org/project/appnope/#history

So this reason of faliture is rather solved

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VolkerH picture VolkerH  路  3Comments

royerloic picture royerloic  路  3Comments

GenevieveBuckley picture GenevieveBuckley  路  3Comments

kevinyamauchi picture kevinyamauchi  路  4Comments

itamarst picture itamarst  路  3Comments