PAI 789 Advanced Policy Analysis > old

Apr 10

What's the issue?

There is an error in the most recent version of one of the modules used by geopandas. The error can cause coordinate transformations to fail. It occurs when the .to_crs() method is called and looks like this:

pyproj.exceptions.ProjError: x, y, z, and time must be same size

How do I know if my computer is affected?

There are two ways to tell. One option is to try running the demo script in g24. If it draws a map and does not give the error message above, you're fine. The other option is to open an Anaconda Prompt (on Windows) or a terminal window (on a Mac) and give the following command:

conda list shapely

If the output from the command says that shapely version 1.8.4 is installed, you're in good shape. If it says that version 2.0.1 is installed, you'll need to use the fix below.

How do I fix it?

To solve the problem, give the following command in the Anaconda Prompt or terminal window:

conda install shapely=1.8.4

That will change the shapely module back to the older, working version. That should be all you need to do.

Site Index | Zoom | Admin
URL: https://cleanenergyfutures.insightworks.com/pages/9119.html
Peter J Wilcoxen, The Maxwell School, Syracuse University
Revised 07/17/2023