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

pmtiles_to_dir throwing error 'read' is not defined #54

Closed
bayre opened this issue Jul 12, 2022 · 2 comments
Closed

pmtiles_to_dir throwing error 'read' is not defined #54

bayre opened this issue Jul 12, 2022 · 2 comments

Comments

@bayre
Copy link
Contributor

bayre commented Jul 12, 2022

From a quick look at the history it seems this error may have snuck in to version 2.0.0

I swapped out lines 88-89 for lines 64-67 and it worked as expected :)

with read(input) as reader:
metadata = reader.metadata

with open(input, "r+b") as f:
source = MmapSource(f)
reader = Reader(source)
metadata = reader.header().metadata

@bdon
Copy link
Member

bdon commented Jul 12, 2022

thanks, was an oversight - want to open a PR?

@bayre
Copy link
Contributor Author

bayre commented Jul 13, 2022

sure, I just opened #55

@bdon bdon closed this as completed Jul 18, 2022
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