LernerLab / GuPPy

Guided Photometry Analysis in Python, a free and open-source FP analysis tool.
GNU General Public License v3.0
63 stars 11 forks source link

Error saving generated plots #59

Closed Maximev1 closed 9 months ago

Maximev1 commented 9 months ago

Hi!

I am just getting started on learning how to use GuPPY and have completed the analysis on the clean data set following the tutorial video (thank you!!). In the final step, where you visualize the data and have the option to save the generated plots I select to save in both offered formats, an error shows up in my terminal window, and no plot files are saved. All other analysis files (as far as I'm aware) are saved.

This is the last part of the error message in terminal: RuntimeError: Neither firefox and geckodriver nor a variant of chromium browser and chromedriver are available on system PATH. You can install the former with 'conda install -c conda-forge firefox geckodriver'. /Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/server/protocol_handler.py:101: RuntimeWarning: coroutine 'WSHandler.send_message' was never awaited work = connection.error(message, repr(e))

I opened a separate terminal window, installed the files it suggested by entering 'conda install -c conda-forge firefox geckodriver', it goes through the entire process and seems to complete without error. I closed out all terminal windows and anaconda and restart the process. Again, it gives me the same error (at least it seems like it to me, same final lines about RunTimeError and firefox/geckodriver.

I am not very code-savvy so apologize if the error is trivial! For information, I am running GuPPy on a M2 MacBook Pro running Sonoma 14.0. GuPPy itself is run via terminal in Google Chrome (had issues with Safari). I have no prior experience with .h5 and .hdf5 files, but perhaps since the analysis output files are saved I can regenerate the plots using the saved output files?

If it helps... this is the entire error message that I get in terminal:

2023-11-08 12:25:24,197 error handling message message: Message 'PATCH-DOC' content: {'events': [{'kind': 'MessageSent', 'msg_type': 'bokeh_event', 'msg_data': {'event_name': 'button_click', 'event_values': {}}}], 'references': []} error: RuntimeError("Neither firefox and geckodriver nor a variant of chromium browser and chromedriver are available on system PATH. You can install the former with 'conda install -c conda-forge firefox geckodriver'.") Traceback (most recent call last): File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/server/protocol_handler.py", line 97, in handle work = await handler(message, connection) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/server/session.py", line 95, in _needs_document_lock_wrapper result = func(self, *args, kwargs) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/server/session.py", line 289, in _handle_patch message.apply_to_document(self.document, self) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/protocol/messages/patch_doc.py", line 115, in apply_to_document invoke_with_curdoc(doc, lambda: doc.apply_json_patch(self.content, setter)) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/document/callbacks.py", line 408, in invoke_with_curdoc return f() File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/protocol/messages/patch_doc.py", line 115, in invoke_with_curdoc(doc, lambda: doc.apply_json_patch(self.content, setter)) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/document/document.py", line 391, in apply_json_patch DocumentPatchedEvent.handle_json(self, event_json, references, setter) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/document/events.py", line 259, in handle_json handler(doc, event_json, references, setter) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/document/events.py", line 300, in _handle_json cb(event_json["msg_data"]) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/document/callbacks.py", line 355, in trigger_json_event model._trigger_event(event) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/util/callback_manager.py", line 119, in _trigger_event self.document.callbacks.notify_event(cast(Model, self), event, invoke) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/document/callbacks.py", line 247, in notify_event invoke_with_curdoc(doc, callback_invoker) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/document/callbacks.py", line 408, in invoke_with_curdoc return f() File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/util/callback_manager.py", line 115, in invoke cast(EventCallbackWithEvent, callback)(event) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/panel/reactive.py", line 406, in _server_event self._comm_event(event) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/panel/reactive.py", line 398, in _comm_event self._process_bokeh_event(event) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/panel/reactive.py", line 345, in _process_bokeh_event self._process_event(event) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/panel/widgets/button.py", line 176, in _process_event self.clicks += 1 File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 367, in _f instance_param.set(obj, val) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 369, in _f return f(self, obj, val) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/init.py", line 625, in set super(Dynamic,self).set(obj,val) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 369, in _f return f(self, obj, val) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 1252, in set obj.param._call_watcher(watcher, event) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 2043, in _callwatcher self._execute_watcher(watcher, (event,)) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 2025, in _execute_watcher watcher.fn(*args, kwargs) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/panel/param.py", line 479, in action value(self.object) File "/Users/maxime/GuPPy-main/GuPPy/visualizePlot.py", line 204, in save_psth = param.Action(lambda x: x.param.trigger('savepsth'), label='Save') File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 1993, in trigger self.set_param(dict(params, *triggers)) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 1929, in setparam return self.update(kwargs) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 1902, in update self_._batch_call_watchers() File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 2063, in _batch_callwatchers self._execute_watcher(watcher, events) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 2025, in _execute_watcher watcher.fn(args, kwargs) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 669, in caller return function() File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/param/parameterized.py", line 407, in _depends return func(*args, **kw) File "/Users/maxime/GuPPy-main/GuPPy/visualizePlot.py", line 259, in save_psth_plot export_svgs(p, filename=temp_op+'.svg') File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/io/export.py", line 194, in export_svgs svgs = get_svgs(obj, width=width, height=height, driver=webdriver, timeout=timeout) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/io/export.py", line 273, in get_svgs web_driver = driver if driver is not None else webdriver_control.get() File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/io/webdriver.py", line 153, in get self.current = self.create() File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/io/webdriver.py", line 157, in create driver = self._create(kind) File "/Users/maxime/opt/anaconda3/envs/guppy/lib/python3.9/site-packages/bokeh/io/webdriver.py", line 175, in _create raise RuntimeError("Neither firefox and geckodriver nor a variant of chromium browser and " \ RuntimeError: Neither firefox and geckodriver nor a variant of chromium browser and chromedriver are available on system PATH. You can install the former with 'conda install -c conda-forge firefox geckodriver'. None

Any insight/help would be very much appreciated!! Maxime

venus-sherathiya commented 9 months ago

I replied on Gitter chat room. Please follow it and let me know what happens.

venus-sherathiya commented 9 months ago

resolved !!