Closed jstitlow closed 3 years ago
UPDATE
The behavior of Analyze current image
is slightly different when running it after selecting Select smaller region to test analysis
, i.e., output in the workspace says 'Processing File: spot detection' as opposed to being stuck on 'Detection with threshold...'.
Appears to be breaking because of Matplotlib: AttributeError: 'FigureCanvasAgg' object has no attribute 'manager'
. I tried changing the matplotlib version based on this github post but the FISHQUANT plugin uninstalled it and returned to its preferred version, presumably the intended behavior.
Any idea how to fix the AttributeError or do you think there is a different problem?
Thanks! j
Thanks for the detailed bug report. For the moment, I can't reproduce it (but I'm not on a Mac).
a first comment, we pinned the versions of all libraries (with the hope to avoid problems like this :-) ): https://github.com/fish-quant/big-fish/blob/master/requirements.txt
could you try one thing? for demo purposes, you can actually run the engine on myminder.org. For this, you have to
+ Add MyBinder-Engine
in the engine meny in the upper right corner).If this works, you can connect the plugin to your local engine, and attempt to analyze the test data with ImJoy running locally.
In the meantime, I'm going to have a closer look myself.
Thanks.
create plots
thanks for the feedback. so there really seems to be an issue with creating Matplotlib plots locally.
concerning your question. If you click on puzzle symbol next to the plugin name, you will get a dropdown menu. Here, all engines ImJoy is connected to will be shown. The local one will be called "Jupyter Notebook" if you kept the default name.
Hi @jstitlow I cannot reproduce your issue on my Mac, but I made a custom version for you with matplotlib pinned to 2.2.3
, could you please try it here: and let us know if it works for you.
The only changed I made is to pin matplotlib to 2.2.3 here.
Thanks, the custom version gives the same result. Something could be wrong with my conda environment. Can we exchange .yml files (mine is here)? Maybe mine will reproduce the error in your environment, or yours will work in my environment?
Regarding Florian's suggestion to switch to the local jupyter engine, when I select the Jupyter Notebook engine, the plugin reloads and no longer works. Here is what I did:
Please connect to the plugin engine
Jupyter-Engine Manager
puzzle icon and select reloadFailed to connect to plugin engine
Add Jupyter Engine
Does this experiment confirm that my jupyter kernel is the issue, since I am now presumably running a working FQ plugin from binder on my local machine?
Thanks, and sorry for the distraction.
Hi, I just created new environment based on your yml file, and I can successfully run the plugin, see the screen recording below:
As you see above, to make sure you are using your local engine, you need to make sure 1) the Jupyter Engine engine is connected 2) the engine is selected as the plugin engine for fish-quant.
However, I just noticed one thing in your error log:
JupyterConnection.js:62 Traceback (most recent call last):
File "/Users/joshtitlow/Library/Python/3.7/lib/python/site-packages/matplotlib/figure.py", line 428, in show
manager = getattr(self.canvas, 'manager')
AttributeError: 'FigureCanvasAgg' object has no attribute 'manager'
This perhaps means you are running your system installed Python instead of the one from conda, this means the PATH env variable is not configured correctly. Could you try to run which python3
and you should see something like /Users/wei.ouyang/miniconda3/envs/fq-imjoy/bin/python3
Then you can also try, see if it runs with this:
python3 -m imjoy --jupyter
And connect it via Add Jupyter Engine
in ImJoy.
Thanks for the suggestions and screen recording.
It's working now.
I ran imjoy --jupyter
from conda base environment, and when I opened imjoy, it looks to have setup the environment properly.
little follow-up.
thanks @oeway for figuring this out!
@jstitlow: any suggestions for how we can improve the documentation to avoid this problem for future users?
I’m still not sure what the issue was exactly. I think it would just get filed under the existing FAQ ‘Remove Conda Environment’ The solution was to start imjoy from the conda base environment, so maybe add an additional suggestion to the existing FAQ as shown below.
Remove fq-imjoy environment: conda env remove --name fq-imjoy or
conda activate
imjoy --jupyter
From: Florian Mueller notifications@github.com Reply-To: fish-quant/fq-imjoy reply@reply.github.com Date: Wednesday, January 6, 2021 at 2:01 AM To: fish-quant/fq-imjoy fq-imjoy@noreply.github.com Cc: Me jstitlow@gmail.com, Mention mention@noreply.github.com Subject: Re: [fish-quant/fq-imjoy] 'Analyze current image' not working (#27)
little follow-up.
thanks @oewayhttps://github.com/oeway for figuring this out!
@jstitlowhttps://github.com/jstitlow: any suggestions for how we can improve the documentation to avoid this problem for future users?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/fish-quant/fq-imjoy/issues/27#issuecomment-755123823, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABMMCBRF7UVLXZSAQQE2QN3SYQDDJANCNFSM4VQZ252Q.
thanks for the feedback.
based on Wei's comments, it seems that your initial attempts were done with the system python and not the anaconda one.
Ideally, we would like to avoid running it out of the base environment since this environment might get easily corrupted by other updates. The plugin engine doesn't handle the environments, it runs in whatever environment you decided to install it.
I'm still surprised, that it didn't work when using a dedicated environment ... essentially what you need to do:
conda create --name fq-imjoy python=3.7
conda activate fq-imjoy
pip install -U imjoy
conda activate fq-imjoy
imjoy --jupyter
Greetings, this is a really cool project! Have been using FQ in Matlab for years and we now have a quirky situation that calls for open source smFISH analysis with a GUI, so thanks!
Describe the bug Spot detection with FG-Imjoy takes a very long time. I suspect there is something wrong, because file processing has not finished after several hours, even though I have cropped the image down to 115x115x5 and chosen a threshold that detects only < 100 spots.
Shortly after the app hangs, there is a Python error message in the Chrome log:
File "/Users/joshtitlow/Library/Python/3.7/lib/python/site-packages/matplotlib/figure.py", line 428, in show manager = getattr(self.canvas, 'manager') AttributeError: 'FigureCanvasAgg' object has no attribute 'manager'
To Reproduce Not sure,
imjoy --jupyter
Logs
FISH-QUANT_nlnxi1609564245421.txt
Chrome_console_FG-Imjoy.log
Screenshots
Versions:
Additional context Add any other context about the problem here.