Skip to content

ValueError: Big-Endian buffer not supported on little-endian compiler #920

Closed

Description

@kahemker

Describe the bug
Sometimes when using the process_data function in forecast.py (usually by invoking get_processed_data), the script would crash with the error:

ValueError: Big-Endian buffer not supported on little-endian compiler

I found the bug by using forecast.get_processed_data() function. I can pull forecast data consistently without errors using the only the get_data() functions.

ValueError: Big-endian buffer not supported on little-endian compiler

To Reproduce
I creating this bug on Windows 10-64 Bit OS with Python 3.8.2. You can follow the script written in this StackOverflow post and occasionally you should see this error.

Expected behavior
Data retrieved should not create runtime errors during processing

Versions:

  • pvlib.0.7.1
  • pandas.1.0.1
  • python: 3.8.2

Additional context
I believe I can fix this bug. I pushed my modified forecast.py here.

Activity

  1. wholmgren commented on Mar 2, 2020

    @wholmgren
    Member

    Thanks for digging into this @kahemker. Can you also post the versions of netcdf and hdf5 that you're using?

    @dopplershift, do you know anything about the byte-order behavior for netcdf subset on THREDDS? This issue and the SO post linked to above suggest that the returned data is sometimes big-endian and sometimes little-endian. This causes a problem when trying to convert to a pandas.Series. I thought netcdf was supposed to make all this just work. Thanks in advance!

  2. kahemker commented on Mar 2, 2020

    @kahemker
    ContributorAuthor

    I am using netcdf4 version 1.5.3 and I am not using hdf5. It does not appear in the setup.py list of dependencies for pvlib-python (required or optional).

    Here is a pastebin that has my entire conda environment.yml file.

  3. dopplershift commented on Mar 2, 2020

    @dopplershift

    I'm pretty sure netCDF is supposed to be dealing with this. @WardF can you shed any light on netCDF endian handling?

    Can someone point to the data in question?

  4. WardF commented on Mar 2, 2020

    @WardF

    NetCDF handles endianness under the hood transparently; however, we are dealing with an issue currently (see Unidata/netcdf-c#1338) where there appears to be a problem. We recently got some Big Endian hardware in-house, to debug this for our upcoming 4.7.4 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions