Skip to content

KeyError: 'path' #15

@john-livingston

Description

@john-livingston
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-5-8ac2c27a4800> in <module>
      2 
      3 tica.save_tica_ffi_catalog(77)
----> 4 images = tica.list_tica_images(sector=77, camera=1, ccd=4)
      5 tpf = images.cutout(column=1000, row=1000, shape=(21, 21))

~/miniconda3/envs/exo/lib/python3.8/site-packages/tess_cloud/tica.py in list_tica_images(sector, camera, ccd, time, provider)
    111 ) -> TessImageList:
    112     """Returns a list of TICA FFI images."""
--> 113     df = _load_tica_ffi_catalog(sector=sector)
    114     if camera:
    115         df = df[df.camera == camera]

~/miniconda3/envs/exo/lib/python3.8/site-packages/tess_cloud/tica.py in _load_tica_ffi_catalog(sector)
    146     log.debug(f"Reading {path}")
    147     # TODO: move sort_values to `save_catalog`
--> 148     return pd.read_parquet(path).sort_values("path")

~/miniconda3/envs/exo/lib/python3.8/site-packages/pandas/core/frame.py in sort_values(self, by, axis, ascending, inplace, kind, na_position, ignore_index, key)
   6756 
   6757             by = by[0]
-> 6758             k = self._get_label_or_level_values(by, axis=axis)
   6759 
   6760             # need to rewrap column in Series to apply key function

~/miniconda3/envs/exo/lib/python3.8/site-packages/pandas/core/generic.py in _get_label_or_level_values(self, key, axis)
   1776             values = self.axes[axis].get_level_values(key)._values
   1777         else:
-> 1778             raise KeyError(key)
   1779 
   1780         # Check for duplicates

KeyError: 'path'

The above is in an older environment (Python 3.8) but I get the same error in a fresh install with Python 3.12.3:

channels:
  - conda-forge
  - defaults
dependencies:
  - appnope=0.1.4=pyhd8ed1ab_0
  - asttokens=2.4.1=pyhd8ed1ab_0
  - bzip2=1.0.8=h80987f9_6
  - ca-certificates=2024.6.2=hf0a4a13_0
  - comm=0.2.2=pyhd8ed1ab_0
  - debugpy=1.6.7=py312h313beb8_0
  - decorator=5.1.1=pyhd8ed1ab_0
  - exceptiongroup=1.2.0=pyhd8ed1ab_2
  - executing=2.0.1=pyhd8ed1ab_0
  - expat=2.6.2=h313beb8_0
  - importlib-metadata=7.1.0=pyha770c72_0
  - importlib_metadata=7.1.0=hd8ed1ab_0
  - ipykernel=6.29.3=pyh3cd1d5f_0
  - ipython=8.25.0=pyh707e725_0
  - jedi=0.19.1=pyhd8ed1ab_0
  - jupyter_client=8.6.2=pyhd8ed1ab_0
  - jupyter_core=5.5.0=py312hca03da5_0
  - libcxx=14.0.6=h848a8c0_0
  - libffi=3.4.4=hca03da5_1
  - libsodium=1.0.18=h27ca646_1
  - matplotlib-inline=0.1.7=pyhd8ed1ab_0
  - ncurses=6.4=h313beb8_0
  - nest-asyncio=1.6.0=pyhd8ed1ab_0
  - openssl=3.3.0=hfb2fe0b_3
  - packaging=24.0=pyhd8ed1ab_0
  - parso=0.8.4=pyhd8ed1ab_0
  - pexpect=4.9.0=pyhd8ed1ab_0
  - pickleshare=0.7.5=py_1003
  - pip=24.0=py312hca03da5_0
  - platformdirs=4.2.2=pyhd8ed1ab_0
  - prompt-toolkit=3.0.42=pyha770c72_0
  - psutil=5.9.0=py312h80987f9_0
  - ptyprocess=0.7.0=pyhd3deb0d_0
  - pure_eval=0.2.2=pyhd8ed1ab_0
  - pygments=2.18.0=pyhd8ed1ab_0
  - python=3.12.3=h99e199e_1
  - pyzmq=25.1.2=py312h313beb8_0
  - readline=8.2=h1a28f6b_0
  - setuptools=69.5.1=py312hca03da5_0
  - six=1.16.0=pyh6c4a22f_0
  - sqlite=3.45.3=h80987f9_0
  - stack_data=0.6.2=pyhd8ed1ab_0
  - tk=8.6.14=h6ba3021_0
  - traitlets=5.14.3=pyhd8ed1ab_0
  - typing_extensions=4.12.1=pyha770c72_0
  - tzdata=2024a=h04d1e81_0
  - wcwidth=0.2.13=pyhd8ed1ab_0
  - wheel=0.43.0=py312hca03da5_0
  - xz=5.4.6=h80987f9_1
  - zeromq=4.3.5=h313beb8_0
  - zipp=3.17.0=pyhd8ed1ab_0
  - zlib=1.2.13=h18a0788_1
  - pip:
      - aioboto3==13.0.0
      - aiobotocore==2.13.0
      - aiofiles==23.2.1
      - aiohttp==3.9.5
      - aioitertools==0.11.0
      - aiosignal==1.3.1
      - astropy==5.3.4
      - astroquery==0.4.6
      - attrs==23.2.0
      - autograd==1.6.2
      - backoff==2.2.1
      - beautifulsoup4==4.12.3
      - bokeh==3.4.1
      - boto3==1.34.106
      - botocore==1.34.106
      - certifi==2024.6.2
      - charset-normalizer==3.3.2
      - contourpy==1.2.1
      - cycler==0.12.1
      - diskcache==5.6.3
      - fbpca==1.0
      - fonttools==4.53.0
      - frozenlist==1.4.1
      - fsspec==2024.6.0
      - future==1.0.0
      - html5lib==1.1
      - idna==3.7
      - jaraco-classes==3.4.0
      - jaraco-context==5.3.0
      - jaraco-functools==4.0.1
      - jinja2==3.1.4
      - jmespath==1.0.1
      - joblib==1.4.2
      - keyring==25.2.1
      - kiwisolver==1.4.5
      - lightkurve==2.4.2
      - markupsafe==2.1.5
      - matplotlib==3.9.0
      - memoization==0.4.0
      - more-itertools==10.2.0
      - multidict==6.0.5
      - numpy==1.26.4
      - oktopus==0.1.2
      - pandas==1.5.3
      - patsy==0.5.6
      - pillow==10.3.0
      - pyarrow==16.1.0
      - pyerfa==2.0.1.4
      - pyparsing==3.1.2
      - python-dateutil==2.9.0.post0
      - pytz==2024.1
      - pyvo==1.5.2
      - pyyaml==6.0.1
      - requests==2.32.3
      - s3fs==2024.6.0
      - s3transfer==0.10.1
      - scikit-learn==1.5.0
      - scipy==1.13.1
      - soupsieve==2.5
      - tess-cloud==0.5.0
      - tess-ephem==0.4.0
      - tess-locator==0.6.0
      - tess-point==0.8.1
      - threadpoolctl==3.5.0
      - tornado==6.4
      - tqdm==4.66.4
      - uncertainties==3.2.0
      - urllib3==2.2.1
      - webencodings==0.5.1
      - wrapt==1.16.0
      - xyzservices==2024.4.0
      - yarl==1.9.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions