Closed acse-jtb20 closed 2 years ago
Thanks for raising this - appears to be a mismatch between matplotlib and cartopy versions.
Can you provide the versions of matplotib and cartopy installed? Using conda commands, this can be done as
conda activate tcrm
conda list
Thanks for the response, I was using Matplotlib 3.5.0 and Cartopy 0.16.0. which was causing the error. Using Matplotlib 3.4.3 instead has resolved the issue.
Hi,
I want to use TCRM on Windows 10 using Anaconda. I have followed the Installation guid on your page to set up the conda environment and added the correct path to the PYTHONPATH variable. After running the tests using run_test_all.cmd, all tests pass expect for one where I am getting the error below. Do I need to add anything else to my environment variables or change my installation?
I appreciate any advise you can give me, thanks.
====================================================================== ERROR: test_scenario (tests.test_system.Yasi_Example)
Traceback (most recent call last): File "C:\ProgramData\Anaconda3\envs\tcrm\lib\site-packages\cartopy\mpl\geoaxes.py", line 1972, in
matplotlib.axes._subplots._subplot_classes[GeoAxes] = GeoAxesSubplot
AttributeError: module 'matplotlib.axes._subplots' has no attribute '_subplot_classes'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\ProgramData\Anaconda3\envs\tcrm\lib\unittest\mock.py", line 1191, in patched return func(*args, keywargs) File "C:\tcrm\tests\test_system.py", line 57, in test_scenario tcevent.main(self.configFile) # run simulation File "C:\tcrm\tcevent.py", line 49, in wrap res = f(*args, *kwargs) File "C:\tcrm\tcevent.py", line 210, in main doWindfieldPlotting(configFile) File "C:\tcrm\tcevent.py", line 170, in doWindfieldPlotting cbarlabel, map_kwargs, plotPath) File "C:\tcrm\PlotInterface\maps.py", line 611, in saveWindfieldMap fig.plot(data, xgrid, ygrid, title, lvls, cbarlab, map_kwargs) File "C:\tcrm\PlotInterface\maps.py", line 573, in plot super(WindfieldMap, self).plot() File "C:\tcrm\PlotInterface\maps.py", line 317, in plot projection=cartopy.crs.PlateCarree()) File "C:\ProgramData\Anaconda3\envs\tcrm\lib\site-packages\matplotlib\figure.py", line 771, in add_subplot args, kwargs) File "C:\ProgramData\Anaconda3\envs\tcrm\lib\site-packages\matplotlib\figure.py", line 1576, in _process_projection_requirements projection_class, extra_kwargs = projection._as_mpl_axes() File "C:\ProgramData\Anaconda3\envs\tcrm\lib\site-packages\cartopy\crs.py", line 148, in _as_mpl_axes import cartopy.mpl.geoaxes as geoaxes File "C:\ProgramData\Anaconda3\envs\tcrm\lib\site-packages\cartopy\mpl\geoaxes.py", line 1974, in
matplotlib.axes._subplot_classes[GeoAxes] = GeoAxesSubplot
AttributeError: module 'matplotlib.axes' has no attribute '_subplot_classes'