question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pmtiles-convert Attribute Error

See original GitHub issue

I’m getting a python AttributeError when converting a .mbtiles file to .pmtiles

pmtiles-convert postcode.mbtiles postcode2.pmtiles
('compression:', 'disabled')
Traceback (most recent call last):
  File "/home/malcolm/.local/bin/pmtiles-convert", line 38, in <module>
    mbtiles_to_pmtiles(args.input, args.output, args.maxzoom, args.gzip)
  File "/home/malcolm/.local/lib/python2.7/site-packages/pmtiles/convert.py", line 40, in mbtiles_to_pmtiles
    writer.write_tile(row[0], row[1], flipped, force_compress(row[3], gzip))
  File "/home/malcolm/.local/lib/python2.7/site-packages/pmtiles/convert.py", line 15, in force_compress
    return gzip.decompress(data)
AttributeError: 'module' object has no attribute 'decompress'

postcode.zip

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bdoncommented, Sep 3, 2022

@mem48 ok, thanks for the info. Moving forward

  • the pmtiles command line program will be a standalone binary that does not need a python installation, it will be downloadable through GitHub releases at GitHub.com/protomaps/go-pmtiles for linux (and maybe windows) - so the pmtiles-convert through python will be essentially deprecated
  • the tippecanoe fork in GitHub.com/protomaps/tippecanoe should output pmtiles directly soon with -o filename.pmtiles
0reactions
tim-salabimcommented, Sep 3, 2022

@bdon that’s awesome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - How to solve an attribute error in this particular code?
I got the following error when trying to run it. ... AttributeError Traceback (most recent call last) <ipython-input-7-50d6838a5474> in ...
Read more >
Python AttributeError — What is it and how do you fix it?
AttributeError : '***' object has no attribute '***'What is an AttributeError in Python? What can you do to fix it? When does it...
Read more >
AttributeError: 'module' object has no attribute and ImportError
This video covers the AttributeError : 'module' object has no attribute and ImportError: No module name errors in Python.
Read more >
[Solved] AttributeError: 'module' object has no attribute
Click here to subscribe - https://www.youtube.com/channel/UCeVMnSShP_Iviwkknt83cww▻Instagram ...
Read more >
How to Resolve Module Has No Attribute - Python Error ...
In this tutorial I will be showing you how to MANAGE THE "MODULE HAS NO ATTRIBUTE " ERROR MESSAGE using Python. This is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found