Skip to content

BUG: epoch referenced before assignment #48

@jklenzing

Description

@jklenzing

Description

When loading some cdf datasets, pysatCDF may reference epoch before it is assigned.

To Reproduce this bug:

import pysat 
import pysatNASA

vefi = pysat.Instrument('de2', 'vefi')
vefi.load(1983, 1)

yields

        # all of the data left over is 1D, add as Series
>       data = pandas.DataFrame(cdata, index=epoch)
E       UnboundLocalError: local variable 'epoch' referenced before assignment

../pysatCDF/pysatCDF/_cdf.py:686: UnboundLocalError

Test configuration

  • OS: Mac Monterrey
  • Version: python 3.10.8
  • enh/de2 branch of pysatNASA

Additional context

Found while working on pysat/pysatNASA#155

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions