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

Tool bar and specifically the Inspector tool doesn't work consistently #1560

Closed
jportolese opened this issue Jun 13, 2023 · 16 comments
Closed
Labels
bug Something isn't working

Comments

@jportolese
Copy link

Environment Information

Please run the following code on your computer and share the output with us so that we can better debug your issue:

Mon Jun 12 21:43:28 2023 Eastern Daylight Time
OS | Windows | CPU(s) | 20 | Machine | AMD64
Architecture | 64bit | RAM | 63.9 GiB | Environment | Jupyter
Python 3.8.16 (default, Jan 17 2023, 22:25:28) [MSC v.1916 64 bit (AMD64)]
geemap | 0.20.6 | ee | 0.1.351 | ipyleaflet | 0.17.2
folium | 0.14.0 | jupyterlab | 3.5.3 | notebook | 6.5.4
ipyevents | 2.0.1 | geopandas | 0.12.2 |  


Description

I don't have any luck with the tool bar. I run my code and draw the map and if the toolbar shows (doesn't always) and I use the inspector tool it allows me one click on the map before it gives me a plus cursor and stops working entirely. I pretty much have to restart the kernel to get it to work again?

@jportolese jportolese added the bug Something isn't working label Jun 13, 2023
@jportolese jportolese changed the title Inspector Tool doesn't work consistently Tool bar and specifically the Inspector tool doesn't work consistently Jun 13, 2023
@giswqs
Copy link
Member

giswqs commented Jun 13, 2023

Do you have a code example that triggers this?

@jportolese
Copy link
Author

Real basic code. I can send you a video of the inconsistent tool bar

geemapToolbarIssues.mp4

@giswqs
Copy link
Member

giswqs commented Jun 13, 2023

Any error messages in the terminal where you started JupyterLab?

Also check the Chrome Developer tools to see if there is any error message.

image

@giswqs
Copy link
Member

giswqs commented Jun 13, 2023

I am not sure if the Python 3.8 causes the issue. Try creating a fresh conda env with Python 3.9

@jportolese
Copy link
Author

Lots of errors

Traceback (most recent call last):
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 584, in _run_callback
    f = callback(*args, **kwargs)
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 308, in stream_callback
    return callback(self, msg)
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\notebook\services\kernels\handlers.py", line 572, in _on_zmq_reply
    super()._on_zmq_reply(stream, msg)
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\notebook\base\zmqhandlers.py", line 256, in _on_zmq_reply
    self.write_message(msg, binary=isinstance(msg, bytes))
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\websocket.py", line 339, in write_message
    return self.ws_connection.write_message(message, binary=binary)
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\websocket.py", line 1086, in write_message
    fut = self._write_frame(True, opcode, message, flags=flags)
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\websocket.py", line 1061, in _write_frame
    return self.stream.write(frame)
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\iostream.py", line 546, in write
    self._handle_write()
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\iostream.py", line 976, in _handle_write
    self._write_buffer.advance(num_bytes)
  File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\iostream.py", line 182, in advance
    assert 0 < size <= self._size
AssertionError

[E 22:27:48.715 NotebookApp] Uncaught exception in zmqstream callback
Traceback (most recent call last):
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 634, in _handle_events
self._handle_recv()
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 663, in _handle_recv
self._run_callback(callback, msg)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 584, in _run_callback
f = callback(*args, **kwargs)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 308, in stream_callback
return callback(self, msg)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\notebook\services\kernels\handlers.py", line 572, in _on_zmq_reply
super()._on_zmq_reply(stream, msg)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\notebook\base\zmqhandlers.py", line 256, in _on_zmq_reply
self.write_message(msg, binary=isinstance(msg, bytes))
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\websocket.py", line 339, in write_message
return self.ws_connection.write_message(message, binary=binary)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\websocket.py", line 1086, in write_message
fut = self._write_frame(True, opcode, message, flags=flags)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\websocket.py", line 1061, in _write_frame
return self.stream.write(frame)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\iostream.py", line 546, in write
self._handle_write()
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\iostream.py", line 976, in _handle_write
self._write_buffer.advance(num_bytes)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\iostream.py", line 182, in advance
assert 0 < size <= self._size
AssertionError
[E 22:27:48.715 NotebookApp] Exception in callback functools.partial(<function ZMQStream._update_handler.. at 0x0000024C100F9A60>)
Traceback (most recent call last):
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\ioloop.py", line 740, in _run_callback
ret = callback()
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 718, in
self.io_loop.add_callback(lambda: self._handle_events(self.socket, 0))
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 634, in _handle_events
self._handle_recv()
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 663, in _handle_recv
self._run_callback(callback, msg)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 584, in _run_callback
f = callback(*args, **kwargs)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\zmq\eventloop\zmqstream.py", line 308, in stream_callback
return callback(self, msg)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\notebook\services\kernels\handlers.py", line 572, in _on_zmq_reply
super()._on_zmq_reply(stream, msg)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\notebook\base\zmqhandlers.py", line 256, in _on_zmq_reply
self.write_message(msg, binary=isinstance(msg, bytes))
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\websocket.py", line 339, in write_message
return self.ws_connection.write_message(message, binary=binary)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\websocket.py", line 1086, in write_message
fut = self._write_frame(True, opcode, message, flags=flags)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\websocket.py", line 1061, in _write_frame
return self.stream.write(frame)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\iostream.py", line 546, in write
self._handle_write()
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\iostream.py", line 976, in _handle_write
self._write_buffer.advance(num_bytes)
File "C:\Users\jport\anaconda3\envs\gee\lib\site-packages\tornado\iostream.py", line 182, in advance
assert 0 < size <= self._size
AssertionError

@giswqs
Copy link
Member

giswqs commented Jun 13, 2023

This seems to be a Jupyter notebook issue rather than geemap. A lot of Jupyter users reported the same issue. Try downgrading jupyterlab and tornado to see if it works.
https://discourse.jupyter.org/t/jupyter-notebook-zmq-message-arrived-on-closed-channel-error/17869/28

pip install jupyterlab==3.0.0 tornado==6.1

@giswqs
Copy link
Member

giswqs commented Jun 13, 2023

https://discourse.jupyter.org/t/jupyter-notebook-zmq-message-arrived-on-closed-channel-error/17869/16

I also had problem with matplotlib (if a cell contains matplotlib, cell does not end although every line in cell works).
Downgrading to Jupyter_client==7.3.2 and tornado==6.1 works for me.

@jportolese
Copy link
Author

The pip install jupyterlab==3.0.0 tornado==6.1 Fixed it. Tool bar seems to work great now. Thanks!!!

@giswqs
Copy link
Member

giswqs commented Jun 13, 2023

Glad to hear that it helped. Feel free to reopen the issue if needed.

@codefean
Copy link

Downgrading jupyterlab==3.0.0 tornado==6.1 did not resolve my issue with the frozen toolbar. I can just click once and then I am unable to use any other functionality of the toolbar. Any other idea's on a solution to this bug?

@giswqs
Copy link
Member

giswqs commented Jun 23, 2023

Check Chrome Developer tools to see what errors are there

@codefean
Copy link

@giswqs that solved my issue! Thank you so much.

@giswqs
Copy link
Member

giswqs commented Jun 23, 2023

How did you solve it? You mentioned that 'Downgrading jupyterlab==3.0.0 tornado==6.1 did not resolve it'

@codefean
Copy link

It appears I had an issue with mixed content on my browser - too many items running causing issues with Jupyter Notebook functionality. I reset my Chrome settings to normal, plus I reinstalled geemap, Jupyter Notebook, and did downgrade jupyterlab==3.0.0 tornado==6.1.. However, I am fairly positive the issue was due to unusual Chrome settings I was utilizing. Thank you for the support on this!

@giswqs
Copy link
Member

giswqs commented Jun 24, 2023

Thank you for sharing your solution. Hope others facing similar issues can benefit from your suggestion.

@gaowqspace
Copy link

gaowqspace commented Jul 17, 2023

The pip install jupyterlab==3.0.0 tornado==6.1 Fixed it. Tool bar seems to work great now. Thanks!!!

Hi, I met the same error. When I try to downgrade the jupyter noteboob and version, my geemap occured some error.
What command have you used to downgrade? please

I have fixed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants