You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/gholl/checkouts/protocode/mwe/typeerror-fsfile.py", line 12, in <module>
satpy.readers.group_files(fsfs)
File "/data/gholl/miniconda3/envs/py39/lib/python3.9/site-packages/satpy/readers/__init__.py", line 90, in group_files
reader_files = _assign_files_to_readers(
File "/data/gholl/miniconda3/envs/py39/lib/python3.9/site-packages/satpy/readers/__init__.py", line 122, in _assign_files_to_readers
files_to_sort = set(files_to_sort)
TypeError: unhashable type: 'FSFile'
Since group_files is used by MultiScene.from_files, the same exception occurs when trying to pass FSFile objects to Multiscene.from_files.
Describe the solution you'd like
I would like to be able to pass FSFile objects to MultiScene.from_files.
The most reasonable implementation would probably to make FSFile objects hashable. Since both filenames and filesystems are hashable, this should not be a problem.
Describe any changes to existing user workflow
No backward compatibility problems foreseen.
Additional context
I'm not sure if I could solve this differently.
The text was updated successfully, but these errors were encountered:
FSFile objects had been inadvertently made unhashable by
pytroll#1582 . Make FSFile objects
hashable again by implementing a __hash__ method.
- [x] Fixespytroll#1604
- [x] Fixespytroll#1605
Feature Request
Is your feature request related to a problem? Please describe.
When I pass
FSFile
objects toMultiscene.from_files
,satpy.readers.group_files
fails withValueError
:fails with:
Since
group_files
is used byMultiScene.from_files
, the same exception occurs when trying to passFSFile
objects toMultiscene.from_files
.Describe the solution you'd like
I would like to be able to pass FSFile objects to
MultiScene.from_files
.The most reasonable implementation would probably to make
FSFile
objects hashable. Since both filenames and filesystems are hashable, this should not be a problem.Describe any changes to existing user workflow
No backward compatibility problems foreseen.
Additional context
I'm not sure if I could solve this differently.
The text was updated successfully, but these errors were encountered: