numbbo / coco

Numerical Black-Box Optimization Benchmarking Framework
https://numbbo.github.io/coco
Other
254 stars 85 forks source link

[Bug report] "The path is too long" error #2268

Open brockho opened 4 months ago

brockho commented 4 months ago

Describe the bug With the latest version, the path to the downloaded data changed from C:\Users\dimo\.cocopp\data-archives\numbbo.github.io\data-archive\data-archive in my case to C:\Users\dimo\AppData\Local\cocopp\cocopp\Cache\data-archives\numbbo.github.io\data-archive\data-archive\. As a consequence, I get again the infamous

  File "C:\Users\dimo\anaconda3new\Lib\site-packages\cocopp\findfiles.py", line 120, in get_directory
    raise IOError(2, 'Some of the files cannot be extracted ' +
FileNotFoundError: [Errno 2] Some of the files cannot be extracted from "C:\Users\dimo\AppData\Local\cocopp\cocopp\Cache\data-archives\numbbo.github.io\data-archive\data-archive\bbob-biobj\2016\RM-MEDA_Auger_bbob-biobj.tgz". The path is too long.

error.

Your System (please complete the following information when it seems relevant):

nikohansen commented 4 months ago

It looks very likely that lines 97-99 in cocopp.archiving from commit https://github.com/numbbo/coco/commit/f36e3438cb733a5fcbf8c56b72db4adc44301c14 created this problem or didn't fix it:

import platformdirs
cocopp_home = platformdirs.user_cache_dir("cocopp", ensure_exists=True)
default_archive_location = os.path.join(cocopp_home, 'data-archives')