dask-geopandas icon indicating copy to clipboard operation
dask-geopandas copied to clipboard

module 'geopandas' has no attribute 'points_from_xy'

Open khyll opened this issue 5 years ago • 3 comments

I'm running geopandas on Spyder via Anaconda, and get the following error when attempting to use points_from_xy:

runfile('C:/Users/kahy/.spyder-py3/karta_spyder3.py', wdir='C:/Users/kahy/.spyder-py3') 0.4.1 Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/kahy/.spyder-py3/karta_spyder3.py', wdir='C:/Users/kahy/.spyder-py3')

File "C:\Program Files\Miniconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile execfile(filename, namespace)

File "C:\Program Files\Miniconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/kahy/.spyder-py3/karta_spyder3.py", line 91, in main()

File "C:/Users/kahy/.spyder-py3/karta_spyder3.py", line 37, in main geometry=gpd.points_from_xy(mpls['EW_WSG84'], mpls['NS_WSG84']))

AttributeError: module 'geopandas' has no attribute 'points_from_xy'

I checked similar "has no attribute" errors for geopandas (https://github.com/mrocklin/dask-geopandas/issues/2) but I didn't understand the bit about cython. My Python is 3.7.3 64-bit Windows, Conca 4.7.5, Spyder 3.3.3, Geopandas 0.4.1.

Code:

import pandas as pd
import geopandas as gpd
from pyproj import Proj, transform

    mpls = pd.read_excel(path_mpls, index_col=0, header=0)

    mpls_gdf = gpd.GeoDataFrame(mpls, 
            geometry=gpd.points_from_xy(mpls['EW_WSG84'], mpls['NS_WSG84']))

khyll avatar Jul 03 '19 10:07 khyll

This project is not actively maintained

On Wed, Jul 3, 2019 at 11:31 AM khyll [email protected] wrote:

I'm running geopandas on Spyder via Anaconda, and get the following error when attempting to use points_from_xy:

runfile('C:/Users/kahy/.spyder-py3/karta_spyder3.py', wdir='C:/Users/kahy/.spyder-py3') 0.4.1 Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/kahy/.spyder-py3/karta_spyder3.py', wdir='C:/Users/kahy/.spyder-py3')

File "C:\Program Files\Miniconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile execfile(filename, namespace)

File "C:\Program Files\Miniconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/kahy/.spyder-py3/karta_spyder3.py", line 91, in main()

File "C:/Users/kahy/.spyder-py3/karta_spyder3.py", line 37, in main geometry=gpd.points_from_xy(mpls['EW_WSG84'], mpls['NS_WSG84']))

AttributeError: module 'geopandas' has no attribute 'points_from_xy'

I checked similar "has no attribute" errors for geopandas (https://github.com/mrocklin/dask-geopandas/issues/2) http://url but I didn't understand the bit about cython. My Python is 3.7.3 64-bit Windows, Conca 4.7.5, Spyder 3.3.3, Geopandas 0.4.1.

Code:

import pandas as pd import geopandas as gpd from pyproj import Proj, transform

mpls = pd.read_excel(path_mpls, index_col=0, header=0)

mpls_gdf = gpd.GeoDataFrame(mpls,
        geometry=gpd.points_from_xy(mpls['EW_WSG84'], mpls['NS_WSG84']))

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mrocklin/dask-geopandas/issues/6?email_source=notifications&email_token=AACKZTHL2GLU3JTNO3NA6Z3P5R5ZLA5CNFSM4H5ELFZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G5DDTIA, or mute the thread https://github.com/notifications/unsubscribe-auth/AACKZTDDXIMEEXRQXJEWVADP5R5ZLANCNFSM4H5ELFZQ .

mrocklin avatar Jul 03 '19 10:07 mrocklin

A work around is to use map_partitions similar to this example

sephib avatar Feb 17 '20 12:02 sephib

can anyone help with this problem without a work around? I have research partners that were able to use points_from_xy() with no problem. yet my computer seems to dislike geopandas and wont install. I need some help, any would be appreciated.

evawateva33 avatar Jun 04 '20 15:06 evawateva33