ENVI匯出的tif檔案,python讀取失敗。
ENVI中直接儲存為tif或TIF的檔案,python讀取失敗。
報錯如下:
Traceback (most recent call last):
File "/data/wdh/.conda/envs/AI_studywdh/lib/python3.6/site-packages/tifffile/tifffile.py", line 2296, in __init__
byteorder = {b'II': '<', b'MM': '>', b'EP': '<'}[header[:2]]
KeyError: b'\x00\x00'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "beijing_landsat.py", line 19, in <module>
band1 = imageio.imread(path+img_path[:-1]+'1.tif')
File "/data/wdh/.conda/envs/AI_studywdh/lib/python3.6/site-packages/imageio/core/functions.py", line 265, in imread
reader = read(uri, format, "i", **kwargs)
File "/data/wdh/.conda/envs/AI_studywdh/lib/python3.6/site-packages/imageio/core/functions.py", line 186, in get_reader
return format.get_reader(request)
File "/data/wdh/.conda/envs/AI_studywdh/lib/python3.6/site-packages/imageio/core/format.py", line 170, in get_reader
return self.Reader(self, request)
File "/data/wdh/.conda/envs/AI_studywdh/lib/python3.6/site-packages/imageio/core/format.py", line 221, in __init__
self._open(**self.request.kwargs.copy())
File "/data/wdh/.conda/envs/AI_studywdh/lib/python3.6/site-packages/imageio/plugins/tifffile.py", line 226, in _open
self._tf = _tifffile.TiffFile(f, **kwargs)
File "/data/wdh/.conda/envs/AI_studywdh/lib/python3.6/site-packages/tifffile/tifffile.py", line 2298, in __init__
raise TiffFileError('not a TIFF file')
tifffile.tifffile.TiffFileError: not a TIFF file
解決方法:
請使用另存為選項
file—>save as
相關文章
- 使用Python讀取PlantUML匯出的XMI檔案Python
- docker啟動的服務有匯出檔案的功能,檔案一直匯出失敗Docker
- php讀取excel檔案資料的匯入和匯出PHPExcel
- Clion中C++使用當前目錄讀取檔案失敗C++
- kodbox讀取alist檔案失敗,問題解決過程
- python讀取檔案——python讀取和儲存mat檔案Python
- python擴充套件檔案import失敗Python套件Import
- 獲取導致匯入失敗的資料
- mysql匯入sql檔案過大失敗怎麼辦MySql
- win10 讀取檔案錯誤怎麼辦 win10讀取文件失敗什麼原因Win10
- qq安裝出現提取安裝檔案失敗,qq安裝失敗
- python小白檔案讀取Python
- python讀取大檔案Python
- python 讀取csv檔案Python
- 【python】建立,讀取檔案Python
- python 讀取文字檔案Python
- 引入js檔案失敗JS
- 獲取導致匯入失敗的資料(五)
- 獲取導致匯入失敗的資料(四)
- 獲取導致匯入失敗的資料(三)
- 獲取導致匯入失敗的資料(二)
- python如何讀取大檔案Python
- Python -讀取,儲存檔案Python
- MySQL匯入匯出檔案檔案MySql
- python讀取yaml配置檔案的方法PythonYAML
- rz檔案傳輸失敗
- python怎麼讀取配置檔案Python
- Python 讀取HDF5檔案Python
- python解壓並讀取檔案Python
- python讀取和生成excel檔案PythonExcel
- python讀取大檔案的幾種方法Python
- 使用 Python 讀取 8 GB 大小的檔案Python
- Python的configparser模組讀取.ini檔案內容並輸出Python
- STM32 IIC讀取Eeprom失敗問題
- C++中的檔案輸入/輸出(2):讀取檔案 (轉)C++
- rman備份的時候讀取v$session_longops失敗導致備份失敗SessionGo
- 透過python讀取ini配置檔案Python
- Python生成器讀取大檔案Python