fedebotu / clone-anonymous-github

Easily download anonymous Github repositories from https://anonymous.4open.science/ with a GUI interface
95 stars 9 forks source link

Dict issue while downloading #11

Open nightlessbaron opened 2 months ago

nightlessbaron commented 2 months ago
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/
fedebotu commented 2 months ago

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

nightlessbaron commented 2 months ago

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?

fedebotu commented 2 months ago

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 :)