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

AttributeError: 'GeoDataFrame' object has no attribute 'append' #1030

Closed
YimingXiao98 opened this issue Jan 15, 2025 · 3 comments · Fixed by #1031
Closed

AttributeError: 'GeoDataFrame' object has no attribute 'append' #1030

YimingXiao98 opened this issue Jan 15, 2025 · 3 comments · Fixed by #1031
Labels
bug Something isn't working

Comments

@YimingXiao98
Copy link

Environment Information

  • leafmap version: 0.42.6
  • Python version: 3.11
  • Operating System: Linux

Description

When using leafmap's function that works with Maxar (notebook link: [https://leafmap.org/notebooks/67_maxar_open_data/])
I got this error. Looks like it's using a removed command (gdf.append)

What I Did

gdf = leafmap.maxar_all_items(
    collection_id='Kahramanmaras-turkey-earthquake-23',
    return_gdf=True,
    verbose=True
    )
gdf.to_file('maxar_footprints.geojson', driver='GeoJSON')
gdf

Processing (01 out of 76): 10200100B5C3A800 ...
Processing (02 out of 76): 10300100D6740900 ...
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-4-63e56299955b>](https://localhost:8080/#) in <cell line: 0>()
----> 1 gdf = leafmap.maxar_all_items(
      2     collection_id='Kahramanmaras-turkey-earthquake-23',
      3     return_gdf=True,
      4     verbose=True
      5     )

1 frames
[/usr/local/lib/python3.11/dist-packages/pandas/core/generic.py](https://localhost:8080/#) in __getattr__(self, name)
   6297         ):
   6298             return self[name]
-> 6299         return object.__getattribute__(self, name)
   6300 
   6301     @final

AttributeError: 'GeoDataFrame' object has no attribute 'append'
@YimingXiao98 YimingXiao98 added the bug Something isn't working label Jan 15, 2025
@giswqs
Copy link
Member

giswqs commented Jan 16, 2025

What is your pandas and geopandas version? I tested it with the latest version. It works fine.

  • pandas 2.2.3
  • geopandas 1.0.1

@giswqs
Copy link
Member

giswqs commented Jan 16, 2025

@YimingXiao98
Copy link
Author

Oddly enough it doesn't work for me either on my machine (actually our lab server) or on Colab...
Here is what I got, together with the packages' versions:

image
image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants