Replies: 2 comments
-
I'm not immediately sure what's going on. Just to confirm, you're saying that your >>> import geopandas as gpd
>>> pts = gpd.points_from_xy([5]*3, [1,2,3]); squares = pts.buffer(0.1)
>>> print(pts)
<GeometryArray>
[<shapely.geometry.point.Point object at 0x7f7bb7b5af80>,
<shapely.geometry.point.Point object at 0x7f7bb7b5ae90>,
<shapely.geometry.point.Point object at 0x7f7bb7b5af80>]
Length: 3, dtype: geometry Does the problem still exist if you stop and restart your notebook server? The python environment that geopandas is installed in is outside of your home directory, and so should be wiped clean each time you restart your notebook server. |
Beta Was this translation helpful? Give feedback.
-
Hey, Tom. Thanks! This was super helpful. It made me go back and double-check this minimal example on MSPC, but in a new, empty notebook. Lo and behold, it worked fine for me too! That made me realize that it must be attributable to another package I was loading. I was able to recreate the problem with this minimal example: >>> import xesmf as xe
>>> import geopandas as gpd
>>> pts = gpd.points_from_xy([5]*3, [1,2,3])
>>> squares = pts.buffer(0.1) thus tracing the problem back to having first loaded the package Thanks again for taking the time! Drew |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, All!
I have a body of code I've just been finishing up debugging, but as of a couple days ago I've been having the frustrating experience that simple bits of geopandas code that ran fine before (involving calling the buffer and plot methods of GeoDataFrames, for example) are now killing my Python kernel. I'm working in the basic Python environment ('CPU - Python') configured on the MSPC Hub. The geodataframe I'm working with is very small (27 rows, 14 columns), but I've also simply made a dummy set of points and tried buffering them, using code that runs fine on my laptop (i.e.,
pts = gpd.points_from_xy([5]*3, [1,2,3]); squares = pts.buffer(0.1)
), yet the problem persists.Things I've tried, to no avail:
Any ideas what might be wrong? Is it possible that this is just a dependency problem? (I've so far gotten away with being too lazy to use virtual envs, i.e., not wanting to wait eons for conda/mamba, but maybe that would solve my problem?)
Thanks for any input!
Drew
Beta Was this translation helpful? Give feedback.
All reactions