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: 'sedona' has no attribute 'read' #1423

Closed
alex-imb opened this issue May 23, 2024 · 2 comments
Closed

AttributeError: 'sedona' has no attribute 'read' #1423

alex-imb opened this issue May 23, 2024 · 2 comments

Comments

@alex-imb
Copy link

alex-imb commented May 23, 2024

Expected behavior

I have a file at "country.parquet" with 1 polygon/country. I expect that calling the following code would read in the data. I used the example from the Sedona documentation. I have had many similar issues across many versions of Sedona and environments. This particular issue occurs on both a hosted and local environment and all file formats.

PARQUET_PATH = "country.parquet"
df = spark.read.parquet(PARQUET_PATH)

Actual behavior

Instead, I get AttributeError: module 'sedona' has no attribute 'read'.

Steps to reproduce the problem

PARQUET_PATH = "country.parquet"
df = spark.read.parquet(PARQUET_PATH)

Settings

Sedona version = 1.6.0

Apache Spark version = 3.5.1

API type = Python

Python version = 3.10.10

Environment = Standalone, Microsoft Fabric

@jiayuasu
Copy link
Member

@alex-imb How did you create the sedona object?

If you didn't create SedonaContext for sedona and instead use the old Sedona registrator, you can go ahead and call spark.read.format("geoparquet").load(PARQUET_PATH)

@alex-imb
Copy link
Author

Hi @jiayuasu, that did the trick. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants