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

test_generic_image.py failure: "projection not named" #604

Closed
avalentino opened this issue Feb 1, 2019 · 3 comments
Closed

test_generic_image.py failure: "projection not named" #604

avalentino opened this issue Feb 1, 2019 · 3 comments

Comments

@avalentino
Copy link
Contributor

Describe the bug
test_generic_image.py fails on debian/sid:

To Reproduce

$ python3 -m unittest satpy.tests.reader_tests.test_generic_image

Expected behavior
Test complete without errors.

Actual results

$ python3 -m unittest satpy.tests.reader_tests.test_generic_image
EEE/usr/lib/python3/dist-packages/rasterio/__init__.py:216: NotGeoreferencedWarning: Dataset has no geotransform set. The identity matrix may be returned.
  s = DatasetReader(path, driver=driver, **kwargs)
.
======================================================================
ERROR: test_GenericImageFileHandler (satpy.tests.reader_tests.test_generic_image.TestGenericImage)
Test direct use of the reader.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antonio/debian/git/satpy/satpy/tests/reader_tests/test_generic_image.py", line 179, in test_GenericImageFileHandler
    reader = GenericImageFileHandler(fname, fname_info, ftype_info)
  File "/home/antonio/debian/git/satpy/satpy/readers/generic_image.py", line 56, in __init__
    self.read()
  File "/home/antonio/debian/git/satpy/satpy/readers/generic_image.py", line 65, in read
    self.area = self.get_geotiff_area_def(data.crs)
  File "/home/antonio/debian/git/satpy/satpy/readers/generic_image.py", line 87, in get_geotiff_area_def
    return get_geotiff_area_def(self.finfo['filename'], crs)
  File "/home/antonio/debian/git/satpy/satpy/readers/generic_image.py", line 120, in get_geotiff_area_def
    x_size, y_size, area_extent)
  File "/usr/lib/python3/dist-packages/pyresample/geometry.py", line 858, in __init__
    proj = Proj(**proj_dict)
  File "/usr/lib/python3/dist-packages/pyproj/__init__.py", line 362, in __new__
    return _proj.Proj.__new__(self, projstring)
  File "_proj.pyx", line 129, in pyproj._proj.Proj.__cinit__
RuntimeError: b'projection not named'

======================================================================
ERROR: test_geotiff_scene (satpy.tests.reader_tests.test_generic_image.TestGenericImage)
Test reading PNG images via satpy.Scene().
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antonio/debian/git/satpy/satpy/tests/reader_tests/test_generic_image.py", line 143, in test_geotiff_scene
    scn = Scene(reader='generic_image', filenames=[fname])
  File "/home/antonio/debian/git/satpy/satpy/scene.py", line 154, in __init__
    reader_kwargs=reader_kwargs)
  File "/home/antonio/debian/git/satpy/satpy/scene.py", line 199, in create_reader_instances
    ppp_config_dir=self.ppp_config_dir)
  File "/home/antonio/debian/git/satpy/satpy/readers/__init__.py", line 657, in load_readers
    reader_instance.create_filehandlers(loadables)
  File "/home/antonio/debian/git/satpy/satpy/readers/yaml_reader.py", line 500, in create_filehandlers
    filename_set)
  File "/home/antonio/debian/git/satpy/satpy/readers/yaml_reader.py", line 487, in new_filehandlers_for_filetype
    return list(filtered_iter)
  File "/home/antonio/debian/git/satpy/satpy/readers/yaml_reader.py", line 460, in filter_fh_by_metadata
    for filehandler in filehandlers:
  File "/home/antonio/debian/git/satpy/satpy/readers/yaml_reader.py", line 403, in new_filehandler_instances
    yield filetype_cls(filename, filename_info, filetype_info, *req_fh)
  File "/home/antonio/debian/git/satpy/satpy/readers/generic_image.py", line 56, in __init__
    self.read()
  File "/home/antonio/debian/git/satpy/satpy/readers/generic_image.py", line 65, in read
    self.area = self.get_geotiff_area_def(data.crs)
  File "/home/antonio/debian/git/satpy/satpy/readers/generic_image.py", line 87, in get_geotiff_area_def
    return get_geotiff_area_def(self.finfo['filename'], crs)
  File "/home/antonio/debian/git/satpy/satpy/readers/generic_image.py", line 120, in get_geotiff_area_def
    x_size, y_size, area_extent)
  File "/usr/lib/python3/dist-packages/pyresample/geometry.py", line 858, in __init__
    proj = Proj(**proj_dict)
  File "/usr/lib/python3/dist-packages/pyproj/__init__.py", line 362, in __new__
    return _proj.Proj.__new__(self, projstring)
  File "_proj.pyx", line 129, in pyproj._proj.Proj.__cinit__
RuntimeError: b'projection not named'

======================================================================
ERROR: test_get_geotiff_area_def (satpy.tests.reader_tests.test_generic_image.TestGenericImage)
Test reading area definition from a geotiff
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antonio/debian/git/satpy/satpy/tests/reader_tests/test_generic_image.py", line 168, in test_get_geotiff_area_def
    adef = get_geotiff_area_def(fname, data.crs)
  File "/home/antonio/debian/git/satpy/satpy/readers/generic_image.py", line 120, in get_geotiff_area_def
    x_size, y_size, area_extent)
  File "/usr/lib/python3/dist-packages/pyresample/geometry.py", line 858, in __init__
    proj = Proj(**proj_dict)
  File "/usr/lib/python3/dist-packages/pyproj/__init__.py", line 362, in __new__
    return _proj.Proj.__new__(self, projstring)
  File "_proj.pyx", line 129, in pyproj._proj.Proj.__cinit__
RuntimeError: b'projection not named'

----------------------------------------------------------------------
Ran 4 tests in 4.037s

FAILED (errors=3)

Environment Info:

  • OS: Linux
  • SatPy Version: 0.11.2
  • PyResample Version: 1.10.3
  • libproj: 5.2.0
  • pyproj: 1.9.6
  • Readers and writers dependencies (when relevant):

Readers

Environment variable PYGAC_CONFIG_FILE not set!
abi_l1b: ok
abi_l1b_scmi: ok
acspo: ok
ahi_hrit: ok
ahi_hsd: ok
amsr2_l1b: ok
avhrr_l1b_aapp: ok
avhrr_l1b_eps: ok
avhrr_l1b_gaclac: cannot find module 'satpy.readers.avhrr_l1b_gaclac' (No module named 'ConfigParser')
avhrr_l1b_hrpt: ok
caliop_l2_cloud: ok
clavrx: ok
electrol_hrit: ok
fci_l1c_fdhsi: ok
generic_image: ok
geocat: ok
ghrsst_l3c_sst: ok
goes-imager_hrit: ok
goes-imager_nc: ok
grib: ok
iasi_l2: ok
jami_hrit: ok
li_l2: ok
maia: ok
modis_l1b: ok
msi_safe: ok
mtsat2-imager_hrit: ok
nucaps: ok
nwcsaf-geo: ok
nwcsaf-pps_nc: ok
olci_l1b: ok
olci_l2: ok
omps_edr: ok
sar-c_safe: ok
scatsat1_l2b: ok
seviri_l1b_hrit: ok
seviri_l1b_native: ok
seviri_l1b_nc: ok
slstr_l1b: ok
viirs_compact: ok
viirs_edr_flood: ok
viirs_l1b: ok
viirs_sdr: ok

Writers

cf: ok
geotiff: ok
mitiff: ok
ninjotiff: ok
scmi: ok
simple_image: ok

@djhoese
Copy link
Member

djhoese commented Feb 1, 2019

This is a known incompatibility between xarray and rasterio 1.0.14. I've already made the PR for xarray and it has been merged. Waiting on release I guess. I'm on mobile now so can't easily find the URL, sorry.

@avalentino
Copy link
Contributor Author

Found thanks: pydata/xarray#2715

@djhoese
Copy link
Member

djhoese commented May 14, 2021

I think this has been fixed for a long time. Going to close this. Let me know if you still see this exact issue.

@djhoese djhoese closed this as completed May 14, 2021
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