aeon-toolkit / aeon

A toolkit for machine learning from time series
https://aeon-toolkit.org/
BSD 3-Clause "New" or "Revised" License
1.02k stars 128 forks source link

[BUG] Dataset InsectWingbeat cannot be loaded #2320

Closed SebastianSchmidl closed 2 weeks ago

SebastianSchmidl commented 2 weeks ago

Describe the bug

Dataset InsectWingbeat cannot be loaded because the ZIP-file compression method is not supported

Steps/Code to reproduce the bug

>>> from aeon.datasets import load_classification                                                                                                                                                                                                                             
>>> X, y, meta = load_classification("InsectWingbeat", extract_path="data", return_metadata=True)

Expected results

No error raised and the dataset is successfully loaded.

Actual results

image

Versions

```python >>> from aeon import show_versions; show_versions() System: python: 3.9.18 (main, Sep 11 2023, 13:41:44) [GCC 11.2.0] executable: /home/sebastian/.conda/envs/ts-clustering/bin/python machine: Linux-5.15.0-124-generic-x86_64-with-glibc2.35 Python dependencies: pip: 23.3.1 setuptools: 68.2.2 scikit-learn: 1.1.3 aeon: 0.11.1 statsmodels: 0.14.1 numpy: 1.23.5 scipy: 1.12.0 pandas: 1.5.3 matplotlib: 3.8.2 joblib: 1.3.2 numba: 0.56.4 pmdarima: None tsfresh: 0.20.0 ```
TonyBagnall commented 2 weeks ago

thats weird, I'll take a look

TonyBagnall commented 2 weeks ago

what OS are you on? Works for me on windows

TonyBagnall commented 2 weeks ago

so I can download and uncompress this on my desktop, but in code it fails

from aeon.datasets import load_classification
t2X, t2y = load_classification("InsectWingbeat",split="TRAIN",
                               extract_path="C:\\Temp\\Temp2")

I dont know why, maybe its too big? I will try deleting the arff files and upload it again

Traceback (most recent call last):
  File "C:\Code\aeon\aeon\local\temp.py", line 15, in <module>
    t2X, t2y = load_classification("InsectWingbeat",split="TRAIN",
  File "C:\Code\aeon\aeon\datasets\_data_loaders.py", line 1359, in load_classification
    _download_and_extract(
  File "C:\Code\aeon\aeon\datasets\_data_loaders.py", line 473, in _download_and_extract
    zipfile.ZipFile(zip_file_name, "r").extractall(extract_path)
  File "C:\Users\Tony\AppData\Local\Programs\Python\Python39\lib\zipfile.py", line 1633, in extractall
    self._extract_member(zipinfo, path, pwd)
  File "C:\Users\Tony\AppData\Local\Programs\Python\Python39\lib\zipfile.py", line 1686, in _extract_member
    with self.open(member, pwd=pwd) as source, \
  File "C:\Users\Tony\AppData\Local\Programs\Python\Python39\lib\zipfile.py", line 1559, in open
    return ZipExtFile(zef_file, mode, zinfo, pwd, True)
  File "C:\Users\Tony\AppData\Local\Programs\Python\Python39\lib\zipfile.py", line 797, in __init__
    self._decompressor = _get_decompressor(self._compress_type)
  File "C:\Users\Tony\AppData\Local\Programs\Python\Python39\lib\zipfile.py", line 698, in _get_decompressor
    _check_compression(compress_type)
  File "C:\Users\Tony\AppData\Local\Programs\Python\Python39\lib\zipfile.py", line 678, in _check_compression
    raise NotImplementedError("That compression method is not supported")
NotImplementedError: That compression method is not supported
TonyBagnall commented 2 weeks ago

think it was the size, removed the arff and it works for me now @CodeLionX

SebastianSchmidl commented 2 weeks ago

Yes, was the size and works now 👍🏼 Thank you, @TonyBagnall!