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

Coastline Not loaded on Mac #165

Closed
RicksterB57 opened this issue Jul 29, 2024 · 5 comments
Closed

Coastline Not loaded on Mac #165

RicksterB57 opened this issue Jul 29, 2024 · 5 comments

Comments

@RicksterB57
Copy link

GeoPythonPlot error: coastline not loaded

@ggebbie
Copy link
Owner

ggebbie commented Jul 30, 2024

could not replicate on Linux

error due to old version of cartopy.

solution: pin matplotlib to 3.7.3, cartopy to 0.23.0

Hopeful solution: go to package manager in TMI.jl/scripts environment, update GeoPythonPlot

Workaround: clone https://github.com/ggebbie/GeoPythonPlot.jl and force the correct versions through CondaPkg.toml or deps/build.jl.

@ggebbie
Copy link
Owner

ggebbie commented Jul 30, 2024

also, this problem was recently solved by @anthony-meza , perhaps he will have a simpler recipe to fix this

@anthony-meza
Copy link
Collaborator

@RicksterB57 Could you copy and paste the full error here? Or provide a screenshot? It would be very helpful!

@RicksterB57
Copy link
Author

Hello Anthony,

This is the error that I get when I try to use the GeoPythonPlot functions when I run the TMI code

/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/io/init.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_physical/ne_50m_coastline.zip
warnings.warn(f'Downloading: {url}', DownloadWarning)
Exception in Tkinter callback
Traceback (most recent call last):
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/http/client.py", line 1303, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/http/client.py", line 1349, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/http/client.py", line 1298, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/http/client.py", line 1058, in _send_output
self.send(msg)
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/http/client.py", line 996, in send
self.connect()
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/http/client.py", line 1475, in connect
self.sock = self._context.wrap_socket(self.sock,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/ssl.py", line 1104, in _create
self.do_handshake()
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/ssl.py", line 1382, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/tkinter/init.py", line 1967, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/tkinter/init.py", line 861, in callit
func(*args)
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 271, in idle_draw
self.draw()
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/backends/backend_tkagg.py", line 10, in draw
super().draw()
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/backends/backend_agg.py", line 400, in draw
self.figure.draw(self.renderer)
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/artist.py", line 95, in draw_wrapper
result = draw(artist, renderer, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/artist.py", line 72, in draw_wrapper
return draw(artist, renderer)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/figure.py", line 3175, in draw
mimage._draw_list_compositing_images(
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
a.draw(renderer)
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/artist.py", line 72, in draw_wrapper
return draw(artist, renderer)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py", line 525, in draw
return super().draw(renderer=renderer, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/artist.py", line 72, in draw_wrapper
return draw(artist, renderer)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/axes/_base.py", line 3064, in draw
mimage._draw_list_compositing_images(
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
a.draw(renderer)
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/matplotlib/artist.py", line 72, in draw_wrapper
return draw(artist, renderer)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/mpl/feature_artist.py", line 185, in draw
geoms = self._feature.intersecting_geometries(extent)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/feature/init.py", line 309, in intersecting_geometries
return super().intersecting_geometries(extent)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/feature/init.py", line 112, in intersecting_geometries
return (geom for geom in self.geometries() if
^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/feature/init.py", line 291, in geometries
path = shapereader.natural_earth(resolution=self.scale,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/io/shapereader.py", line 306, in natural_earth
return ne_downloader.path(format_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/io/init.py", line 203, in path
result_path = self.acquire_resource(target_path, format_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/io/shapereader.py", line 359, in acquire_resource
shapefile_online = self._urlopen(url)
^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/site-packages/cartopy/io/init.py", line 242, in _urlopen
return urlopen(url)
^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/urllib/request.py", line 519, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/urllib/request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rbbourdon/Github/jlglider/TMI.jl/scripts/.CondaPkg/env/lib/python3.11/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>
Python: Text(0.5, 1.0, 'User-defined surface patch’)

@ggebbie
Copy link
Owner

ggebbie commented Sep 5, 2024

We tried again with a Mac and didn't reproduce this problem. Closing for now but please re-open if it persists.

@ggebbie ggebbie closed this as completed Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants