pawamoy / aria2p

Command-line tool and library to interact with an aria2c daemon process with JSON-RPC.
https://pawamoy.github.io/aria2p
ISC License
479 stars 93 forks source link

IndexError, when getting get_download().name #103

Closed SayanthD closed 3 years ago

SayanthD commented 3 years ago

Describe the bug Aria2p results in IndexError, while returning get_download().name

To Reproduce Steps to reproduce the behavior:

  1. run aria2c --enable-rpc
  2. Add a direct link download, get gid and print name
    
    import aria2p

api = aria2p.API() uri = 'https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_640_3MG.mp4'

gid = api.add_uris([uri]).gid name = api.get_download(gid).name

print(name)


3. See error
![aria2p_4](https://user-images.githubusercontent.com/13906889/132089858-6a9755b4-d4a5-4c87-9dc5-7929d9cc1dba.PNG)

**Expected behavior**
Prints 'file_example_MP4_640_3MG.mp4'

**Screenshots**
If applicable, add screenshots to help explain your problem.

**System (please complete the following information):**
- `aria2p` version: 0.10.4
- Python version: 3.9.5
- OS: Linux

**Additional context**
JSON-RPC result with aria2.tellStatus

![aria2p_3](https://user-images.githubusercontent.com/13906889/132001556-e04d4768-b4b0-4f75-999f-108f47f51a58.PNG)
pawamoy commented 3 years ago

I cannot replicate :/

Screenshot_2021-09-10_12-40-35

But I think it's the same as this issue: https://github.com/pawamoy/aria2p/issues/68#issuecomment-694152813

I'll close as duplicate.