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.

3.2rc1 ASDF test_backwards_compat failed

See original GitHub issue
============================= test session starts =============================
platform win32 -- Python 3.7.1, pytest-4.1.0, py-1.7.0, pluggy-0.8.0

Running tests with Astropy version 3.2rc1.
Running tests in Miniconda3\envs\py37\lib\site-packages\astropy.

Date: 2019-05-09T14:24:44

Platform: Windows-10-10.0.17763-SP0

Executable: C:\...\Miniconda3\envs\py37\python.exe

Full Python Version: 
3.7.1 (default, Oct 28 2018, 08:39:03) [MSC v.1912 64 bit (AMD64)]

encodings: sys: utf-8, locale: cp1252, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Numpy: 1.16.2
Scipy: 1.1.0
Matplotlib: 3.0.3
h5py: 2.8.0
Pandas: 0.23.4
Asdf: 2.3.3
Cython: 0.29
Scikit-image: not available
astropy_helpers: 3.2rc1
Using Astropy options: remote_data: any.

Matplotlib: 3.0.3
Freetype: 2.9.1
rootdir: C:\..., inifile:
plugins: xdist-1.24.0, remotedata-0.3.1, openfiles-0.3.0, mpl-0.10, forked-0.2, doctestplus-0.1.3, arraydiff-0.2
collected 12639 items
____________________________ test_backwards_compat ____________________________

    def test_backwards_compat():
        """
        Make sure that we can continue to read FITS HDUs that use the schema from
        the ASDF Standard.
    
        This test uses the examples in the fits schema from the ASDF Standard,
        since these make no reference to Astropy's own fits definition.
        """
    
        def check(asdffile):
            assert isinstance(asdffile['example'], fits.HDUList)
    
>       run_schema_example_test('stsci.edu', 'asdf', 'fits/fits', '1.0.0', check)

..\Miniconda3\envs\py37\lib\site-packages\astropy\io\misc\asdf\tags\fits\tests\test_fits.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

organization = 'stsci.edu', standard = 'asdf', name = 'fits/fits'
version = '1.0.0'
check_func = <function test_backwards_compat.<locals>.check at 0x000002316C136730>

    def run_schema_example_test(organization, standard, name, version, check_func=None):
    
        import asdf
        from asdf.tests import helpers
        from asdf.types import format_tag
        from asdf.resolver import default_resolver
    
        tag = format_tag(organization, standard, version, name)
        schema_path = urllib.parse.urlparse(default_resolver(tag)).path
    
>       with open(schema_path, 'rb') as ff:
E       OSError: [Errno 22] Invalid argument: '/C:/Users/PL/Miniconda3/envs/py37/lib/site-packages/asdf/schemas/stsci.edu/asdf/fits/fits-1.0.0.yaml'

..\Miniconda3\envs\py37\lib\site-packages\astropy\io\misc\asdf\tags\tests\helpers.py:21: OSError
____________________________ test_backwards_compat ____________________________

    def test_backwards_compat():
        """
        Make sure that we can continue to read tables that use the schema from
        the ASDF Standard.
    
        This test uses the examples in the table schema from the ASDF Standard,
        since these make no reference to Astropy's own table definition.
        """
    
        def check(asdffile):
            assert isinstance(asdffile['example'], table.Table)
    
>       run_schema_example_test('stsci.edu', 'asdf', 'core/table', '1.0.0', check)

..\Miniconda3\envs\py37\lib\site-packages\astropy\io\misc\asdf\tags\table\tests\test_table.py:244: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

organization = 'stsci.edu', standard = 'asdf', name = 'core/table'
version = '1.0.0'
check_func = <function test_backwards_compat.<locals>.check at 0x000002316C157D90>

    def run_schema_example_test(organization, standard, name, version, check_func=None):
    
        import asdf
        from asdf.tests import helpers
        from asdf.types import format_tag
        from asdf.resolver import default_resolver
    
        tag = format_tag(organization, standard, version, name)
        schema_path = urllib.parse.urlparse(default_resolver(tag)).path
    
>       with open(schema_path, 'rb') as ff:
E       OSError: [Errno 22] Invalid argument: '/C:/Users/PL/Miniconda3/envs/py37/lib/site-packages/asdf/schemas/stsci.edu/asdf/core/table-1.0.0.yaml'

..\Miniconda3\envs\py37\lib\site-packages\astropy\io\misc\asdf\tags\tests\helpers.py:21: OSError

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ndencommented, May 10, 2019

I think the problem is in asdf.uitl.filepath_to_url. If that’s the case asdf tests should fail on Windows too. I’m not sure when we stopped testing asdf on Win but we should start that job. Since filepath_to_url is only used in testing I suggest astropy xfails those tests on Win until this is fixed in asdf.

0reactions
jdavies-stcommented, May 10, 2019

The asdf package CI tests do run on Windows. If you look at the Travis CI results, the last couple tests in the tox env do it on Windows. But clearly this test case is not covered. I tried covering it here

https://github.com/spacetelescope/asdf/pull/680

but that seems to not have covered the same case. Hmm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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