NotImplementedError: lzw_encode
See original GitHub issueHi there, I’m trying to write a multi page tiff file, like this
with tifffile.TiffWriter("nyname.tif", append=True) as P: P.write(**this_page_dict)
where the dict is:
{
'extratags': [(274, 3, 1, 1), (339, 3, 1, 1), (285, 2, 25, b'myTitle')],
'bitspersample': 16,
'compression': 5,
'photometric': 1,
'rowsperstrip': 8,
'planarconfig': 1,
'resolution': (1677721600, 16777216),
'data': array(..., dtype=uint16),
'dtype': dtype('uint16')
}
It’s giving me a NotImplemented error, since I’m using compression=5 (LZW).
Traceback (most recent call last): File “…filename.py”, line 122, in <module> P.write(**this_page_dict) File “…\venv\lib\site-packages\tifffile\tifffile.py”, line 2342, in write strip = compress(strip) File “imagecodecs_imcd.pyx”, line 856, in imagecodecs._imcd.lzw_encode NotImplementedError: lzw_encode
Any pointer as of why and maybe how to “solve” / work around this?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Throw a NotImplementedError in Python - Stack Overflow
The exception is being thrown because your class CNNnewsSpider does not override the method parse() from scrapy.BaseSpider .
Read more >[SOLVED]Resolving NotImplementedError? - PyTorch Forums
Hi, I have an issue on creating a super class of autoencoder. The following class causes an error of “NotImplementedError” in module.py when ......
Read more >Papa John s Pizza_v4.19.11225_apkpure.com.apk
Not all malicious and suspicious indicators are displayed. Get your own cloud service or the full version to view all details. Suspicious ...
Read more >origami-2.1.0-2-any.pkg.tar.xz Arch Linux Download
/usr/lib/ruby/gems/3.0.0/doc/origami-2.1.0/ri/Origami/Filter/LZW/encode-i.ri ... -2.1.0/ri/Origami/Filter/NotImplementedError/cdesc-NotImplementedError.ri.
Read more >raise NotImplemented should be raise NotImplementedError ...
Raise NotImplementedError to indicate that a super-class method is not implemented and that child classes should implement it. Anti-pattern. class BaseClass: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @cgohlke , would you suggest using @noobOriented’s work around? If so, I’m not quite sure how to implement that for LZW compression if you could include some notes 🙏
Also for sake of clarity, if imagecodecs is not ready to support LZW encoding, could we update the docs here and here to mention you can only decode with LZW via imagecodecs? Maybe imagecodecs will inlcude LZW soon (seems to be the case) and that’s why this request is still open. Thank you!
Fixed in imagecodecs 2022.7.27.