pymmcore-plus / napari-micromanager

GUI interface between napari and micromanager powered by pymmcore-plus and pymmcore-widgets
https://pymmcore-plus.github.io/napari-micromanager/
BSD 3-Clause "New" or "Revised" License
61 stars 21 forks source link

icons do not show up when starting napari with plugin from command line #88

Closed ptbrown1729 closed 1 year ago

ptbrown1729 commented 2 years ago

I am running python 3.9.9, napari version 0.4.12, and napari-micromanager installed from github version 0.0.1rc6.dev9+g69c3bed.d20220117 on Windows 10 Pro version 10.0.19041

When I start napari and the napari-micromanager plugin using napari -w micromanager the icons (e.g. the up/down/right/left arrows for the stage and camera icon on the live button) are not shown. Instead there are blank square placeholders. This may be a more general napari issue, because the napari buttons (e.g. layers buttons, toggle n-display, etc) also do not show any icons.

On the other hand, if I first launch napari from the command line napari and then navigate to the plugins menu and select the micromanager plugin, the icons appear as expected

tlambert03 commented 2 years ago

thanks @ptbrown1729, can you tell me what Qt backend version you are on?

tlambert03 commented 2 years ago

actually, more specifically... maybe just give me the output of conda list (or pip list if conda is not involved)

ptbrown1729 commented 2 years ago

Here is the output from napari.sys_info()

napari: 0.4.12
Platform: Windows-10-10.0.19041-SP0\nPython: 3.9.9 | packaged by conda-forge | (main, Dec 20 2021, 02:36:06) [MSC v.1929 64 bit (AMD64)]
Qt: 5.12.9
PyQt5: 5.12.3
NumPy: 1.21.2
SciPy: 1.7.3
Dask: 2021.12.0
VisPy: 0.9.4
OpenGL:
  - GL version:  4.3.0 - Build 20.19.15.4531
  - MAX_TEXTURE_SIZE: 16384
  - Screens:
  -  - screen 1: resolution 1920x1080, scale 1.0
  - Plugins:
  -   - console: 0.0.4
  -   - micromanager: 0.0.1rc6.dev9+g69c3bed.d20220117
  -   - naparij: 0.2.2
  -   - scikit-image: 0.4.12
  -   - svg: 0.1.5'

and here is conda list

# Name                    Version                   Build  Channel
alabaster                 0.7.12                     py_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
asciitree                 0.3.3                      py_2    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
blas                      1.0                         mkl  
blosc                     1.21.0               h0e60522_0    conda-forge
bokeh                     2.4.2            py39hcbf5309_0    conda-forge
bottleneck                1.3.2            py39h7cc1a96_1  
brotli                    1.0.9                h8ffe710_6    conda-forge
brotli-bin                1.0.9                h8ffe710_6    conda-forge
brotlipy                  0.7.0           py39hb82d6ee_1003    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-blosc2                  2.0.4                h09319c2_1    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
cachey                    0.2.1              pyh9f0ad1d_0    conda-forge
certifi                   2021.10.8        py39hcbf5309_1    conda-forge
cffi                      1.15.0           py39h0878f49_0    conda-forge
cfitsio                   4.0.0                hd67004f_0    conda-forge
charls                    2.2.0                h39d44d4_0    conda-forge
charset-normalizer        2.0.10             pyhd8ed1ab_0    conda-forge
click                     8.0.3            py39hcbf5309_1    conda-forge
cloudpickle               2.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              36.0.1           py39h7bc7c5c_0    conda-forge
cudatoolkit               11.5.0               hfde6d1b_9    conda-forge
cupy                      10.0.0           py39hc474d4a_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cytoolz                   0.11.2           py39hb82d6ee_1    conda-forge
dask                      2021.12.0          pyhd8ed1ab_0    conda-forge
dask-core                 2021.12.0          pyhd8ed1ab_0    conda-forge
debugpy                   1.5.1            py39h415ef7b_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
distributed               2021.12.0        py39hcbf5309_0    conda-forge
docstring_parser          0.13               pyhd8ed1ab_0    conda-forge
docutils                  0.15.2           py39hcbf5309_3    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
fasteners                 0.16               pyhd8ed1ab_0    conda-forge
fastrlock                 0.8              py39h415ef7b_1    conda-forge
fonttools                 4.28.5           py39hb82d6ee_0    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
freetype-py               2.2.0              pyh9f0ad1d_0    conda-forge
fsspec                    2021.11.1          pyhd8ed1ab_0    conda-forge
giflib                    5.2.1                h8d14728_2    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
hsluv                     5.0.2              pyh44b312d_0    conda-forge
icc_rt                    2019.0.0             h0cc432a_1  
icu                       68.2                 h0e60522_0    conda-forge
idna                      3.1                pyhd3deb0d_0    conda-forge
imagecodecs               2021.11.20       py39he391c9c_1    conda-forge
imageio                   2.13.5             pyh239f2a4_0    conda-forge
imagesize                 1.3.0              pyhd8ed1ab_0    conda-forge
importlib-metadata        4.10.0           py39hcbf5309_0    conda-forge
importlib_metadata        4.10.0               hd8ed1ab_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
intel-openmp              2022.0.0          h57928b3_3663    conda-forge
ipykernel                 6.6.1            py39h832f523_0    conda-forge
ipython                   7.31.0           py39hcbf5309_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jbig                      2.1               h8d14728_2003    conda-forge
jedi                      0.18.1           py39hcbf5309_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
joblib                    1.1.0              pyhd3eb1b0_0  
jpeg                      9d                   h8ffe710_0    conda-forge
jpype1                    1.3.0                    pypi_0    pypi
jsonschema                4.3.3              pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.0              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.1            py39hcbf5309_1    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
kiwisolver                1.3.2            py39h2e07f2f_1    conda-forge
krb5                      1.19.2               h20d022d_3    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      3.0                  h0e60522_0    conda-forge
libaec                    1.0.6                h39d44d4_0    conda-forge
libblas                   3.9.0              12_win64_mkl    conda-forge
libbrotlicommon           1.0.9                h8ffe710_6    conda-forge
libbrotlidec              1.0.9                h8ffe710_6    conda-forge
libbrotlienc              1.0.9                h8ffe710_6    conda-forge
libcblas                  3.9.0              12_win64_mkl    conda-forge
libclang                  11.1.0          default_h5c34c98_1    conda-forge
libcurl                   7.81.0               h789b8ee_0    conda-forge
libdeflate                1.8                  h8ffe710_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
liblapack                 3.9.0              12_win64_mkl    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libssh2                   1.10.0               h680486a_2    conda-forge
libtiff                   4.3.0                hd413186_2    conda-forge
libwebp-base              1.2.1                h8ffe710_0    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
libzopfli                 1.0.3                h0e60522_0    conda-forge
localize-psf              0.1.0                    pypi_0    pypi
locket                    0.2.0                      py_2    conda-forge
loguru                    0.5.3                    pypi_0    pypi
lz4-c                     1.9.3                h8ffe710_1    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
magicgui                  0.3.4              pyhd8ed1ab_0    conda-forge
markupsafe                2.0.1            py39hb82d6ee_1    conda-forge
matplotlib                3.5.1            py39hcbf5309_0    conda-forge
matplotlib-base           3.5.1            py39h581301d_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mcsim                     0.1.0                     dev_0    <develop>
mkl                       2021.4.0           h0e2418a_729    conda-forge
mkl-service               2.4.0            py39h2bbff1b_0  
mkl_fft                   1.3.1            py39h277e83a_0  
mkl_random                1.2.2            py39hf11a4ad_0  
monotonic                 1.5                        py_0    conda-forge
msgpack-python            1.0.3            py39h2e07f2f_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
napari                    0.4.12             pyhd8ed1ab_0    conda-forge
napari-console            0.0.4              pyhd8ed1ab_0    conda-forge
napari-j                  0.2.2                    pypi_0    pypi
napari-micromanager       0.0.1rc6.dev9+g69c3bed.d20220117           dev_0    <develop>
napari-plugin-engine      0.2.0              pyhd8ed1ab_2    conda-forge
napari-svg                0.1.5              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
networkx                  2.6.3              pyhd8ed1ab_1    conda-forge
numcodecs                 0.9.1            py39h415ef7b_2    conda-forge
numexpr                   2.8.1            py39hb80d3ca_0  
numpy                     1.21.2           py39hfca59bb_0  
numpy-base                1.21.2           py39h0829f74_0  
numpydoc                  1.1.0                      py_1    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                hb211442_1    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.3.5            py39h6214cd6_0  
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
partd                     1.2.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.4.0            py39h916092e_0    conda-forge
pint                      0.18               pyhd8ed1ab_0    conda-forge
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.24             pyha770c72_0    conda-forge
psutil                    5.8.0            py39h2bbff1b_1  
psygnal                   0.2.0            py39h2e07f2f_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pycromanager              0.14.1                   pypi_0    pypi
pydantic                  1.9.0            py39hb82d6ee_0    conda-forge
pydaqmx                   1.4.6                    pypi_0    pypi
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pymmcore                  10.1.1.70.4              pypi_0    pypi
pymmcore-plus             0.1.7                    pypi_0    pypi
pyopengl                  3.1.5                      py_0    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.6              pyhd8ed1ab_0    conda-forge
pyqt                      5.12.3           py39hcbf5309_8    conda-forge
pyqt-impl                 5.12.3           py39h415ef7b_8    conda-forge
pyqt5-sip                 4.19.18          py39h415ef7b_8    conda-forge
pyqtchart                 5.12             py39h415ef7b_8    conda-forge
pyqtwebengine             5.12.1           py39h415ef7b_8    conda-forge
pyro5                     5.13.1                   pypi_0    pypi
pyrsistent                0.18.0           py39hb82d6ee_0    conda-forge
pysocks                   1.7.1            py39hcbf5309_4    conda-forge
python                    3.9.9           h9a09f29_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pywavelets                1.2.0            py39h5d4886f_1    conda-forge
pywin32                   303              py39hb82d6ee_0    conda-forge
pywinusb                  0.4.2                    pypi_0    pypi
pyyaml                    6.0              py39hb82d6ee_3    conda-forge
pyzmq                     22.3.0           py39he46f08e_1    conda-forge
qt                        5.12.9               h5909a2a_4    conda-forge
qtconsole                 5.2.2              pyhd8ed1ab_1    conda-forge
qtconsole-base            5.2.2              pyhd8ed1ab_1    conda-forge
qtpy                      2.0.0              pyhd8ed1ab_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
scikit-image              0.18.3           py39hf11a4ad_0  
scipy                     1.7.3            py39h0a974cb_0  
serpent                   1.40                     pypi_0    pypi
setuptools                60.5.0           py39hcbf5309_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.8                ha925a31_3    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
sphinx                    4.3.2              pyh6c4a22f_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_1    conda-forge
sqlite                    3.37.0               h8ffe710_0    conda-forge
superqt                   0.2.5.post1        pyhd8ed1ab_0    conda-forge
tbb                       2021.5.0             h2d74725_0    conda-forge
tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
tifffile                  2021.7.2           pyhd3eb1b0_2  
tk                        8.6.11               h8ffe710_1    conda-forge
toolz                     0.11.2             pyhd8ed1ab_0    conda-forge
tornado                   6.1              py39hb82d6ee_2    conda-forge
tqdm                      4.62.3             pyhd8ed1ab_0    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
typing-extensions         4.0.1                hd8ed1ab_0    conda-forge
typing_extensions         4.0.1              pyha770c72_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
useq-schema               0.1.0                    pypi_0    pypi
vc                        14.2                 hb210afc_6    conda-forge
vispy                     0.9.4            py39h5d4886f_0    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
win32-setctime            1.0.4                    pypi_0    pypi
win_inet_pton             1.1.0            py39hcbf5309_3    conda-forge
wrapt                     1.13.3           py39hb82d6ee_1    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
zarr                      2.10.3             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zfp                       0.5.5                h0e60522_8    conda-forge
zict                      2.0.0                      py_0    conda-forge
zipp                      3.7.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h8ffe710_1013    conda-forge
zmq                       0.0.0                    pypi_0    pypi
zstd                      1.5.1                h6255e5f_0    conda-forge
tlambert03 commented 2 years ago

This may be a more general napari issue, because the napari buttons (e.g. layers buttons, toggle n-display, etc) also do not show any icons.

this definitely seems like it would be the case, but it's not immediately clear to me from your environment why this might be happening... if you're willing to play with this environment, could you update napari to 0.4.13?

ptbrown1729 commented 2 years ago

I updated napari, but this did not affect the behavior napari.sys_info()

napari: 0.4.13
Platform: Windows-10-10.0.19041-SP0
Python: 3.9.9 | packaged by conda-forge | (main, Dec 20 2021, 02:36:06) [MSC v.1929 64 bit (AMD64)]
Qt: 5.12.9
PyQt5: 5.12.3
NumPy: 1.21.2
SciPy: 1.7.3
Dask: 2022.01.0
VisPy: 0.9.4

OpenGL:
  - GL version:  4.3.0 - Build 20.19.15.4531
  - MAX_TEXTURE_SIZE: 16384

Screens:
  - screen 1: resolution 1920x1080, scale 1.0

Plugins:
  - console: 0.0.4
  - micromanager: 0.0.1rc6.dev9+g69c3bed.d20220117
  - naparij: 0.2.2
  - scikit-image: 0.4.13
  - svg: 0.1.5
tlambert03 commented 2 years ago

OK thanks for checking. I'll have to try to find some time to try to reproduce.

ptbrown1729 commented 2 years ago

I also verified this issue does not have anything to do with this plugin ... I get the same behavior with the naprij plugin. So I will open this issue on napari instead

tlambert03 commented 2 years ago

thanks. I'll meet you over there :)

tlambert03 commented 2 years ago

one thing I'll probably ask you to do over there as well is to create a new environment. So, if you have a moment, try:

conda create -n test -c conda-forge python=3.9.9 napari
conda activate test
pip install napari-micromanager
napari -w micromanager
ptbrown1729 commented 2 years ago

https://github.com/napari/napari/issues/4004

tlambert03 commented 2 years ago

as mentioned over in the other thread. It looks like this is specifically related to the qt distribution on conda-forge, and likely only on windows... As a temporary workaround for anyone running into this, please create an environment where pyqt is not sourced from conda forge:

conda create -n myenv python=3.9
conda activate myenv
pip install napari[all] napari-micromanager
napari -w micromanager
tlambert03 commented 1 year ago

now that we're not using .ui files anymore, I'm going to assume this is resolved (since it seemed to be specific to ui files, on a specific qt distribution, on windows). If anyone sees this again please comment here