clone-anonymous-github icon indicating copy to clipboard operation
clone-anonymous-github copied to clipboard

Dict issue while downloading

Open nightlessbaron opened this issue 1 year ago • 3 comments

Cloning project:BETT-773F
Traceback (most recent call last):
  File "/scratch/workspace/vpimpalkhute_umass_edu-time-series/clone-anonymous-github/src/download.py", line 186, in <module>
    download_repo(args.__dict__)
  File "/scratch/workspace/vpimpalkhute_umass_edu-time-series/clone-anonymous-github/src/download.py", line 144, in download_repo
    sizes = [s[1] for s in get_dict_vals(file_list, ['size'])]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/scratch/workspace/vpimpalkhute_umass_edu-time-series/clone-anonymous-github/src/download.py", line 144, in <listcomp>
    sizes = [s[1] for s in get_dict_vals(file_list, ['size'])]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/scratch/workspace/vpimpalkhute_umass_edu-time-series/clone-anonymous-github/src/download.py", line 28, in get_dict_vals
    for i, j in test_dict.items():
                ^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'items'

Reproduce the error:

  1. git clone https://github.com/fedebotu/clone-anonymous-github.git && cd clone-anonymous-github
  2. pip install -r requirements.txt
  3. python3 src/download.py --url https://anonymous.4open.science/r/BETT-773F/

nightlessbaron avatar May 03 '24 19:05 nightlessbaron

Does the same happen with other repositories too? If so, they might have changed the API

fedebotu avatar May 04 '24 00:05 fedebotu

Hi, thanks for responding. Yes, the same issue occurs for other repos. Tried with this one: https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/. How do I solve this issue then?

nightlessbaron avatar May 04 '24 00:05 nightlessbaron

You should try connecting manually to the URL of the server to see the file list and its new structure. Also, you may check the original Anonymous Github repo to see whether they made some charges. This said I don't have bandwidth at the moment, so I would be grateful if you could try to solve it. Thanks :)

fedebotu avatar May 04 '24 00:05 fedebotu