Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delugePush3.py IndexError #10

Closed
hinderaker opened this issue Jan 15, 2023 · 9 comments
Closed

delugePush3.py IndexError #10

hinderaker opened this issue Jan 15, 2023 · 9 comments

Comments

@hinderaker
Copy link

hinderaker commented Jan 15, 2023

Traceback (most recent call last):                                                                                                  
  File "/config/deluge-dc-notif/delugePush3.py", line 128, in                                                               
    getState(torrentHash, torrentName, RATIO_CHECK_DELAY, False)                                                                    
  File "/config/deluge-dc-notif/delugePush3.py", line 71, in getState                                                               
    tracker = lines[7][9:]                                                                                                          
IndexError: list index out of range

@ckcr4lyf
Copy link
Owner

Hey @hinderaker , can you share your deluge version and python version?

You can find them out by running:

$ deluge --version
$ python -V

@hinderaker
Copy link
Author

Hey @ckcr4lyf :)

deluge 2.0.5                                                                                                                        
libtorrent: 2.0.6.0                                                                                                                 
Python: 3.10.4      

@hinderaker
Copy link
Author

Also tried it with newest docker image from linuxserver.io now.

deluge 2.1.1                                                                                                                        
libtorrent: 2.0.8.0                                                                                                                 
Python: 3.11.1

<Deferred at 0x7fc7f393e490 current result: None>                                                                                   
Traceback (most recent call last):                                                                                                  
  File "/config/deluge-dc-notif/delugePush3.py", line 128, in                                                               
    getState(torrentHash, torrentName, RATIO_CHECK_DELAY, False)                                                                    
  File "/config/deluge-dc-notif/delugePush3.py", line 71, in getState                                                               
    tracker = lines[7][9:]                                                                                                          
              ~~~~~^^^                                                                                                              
IndexError: list index out of range 

@ckcr4lyf
Copy link
Owner

Let me try it out with the Deluge 2 & Python 3 as well and get back to you.

Are you running it as python delugePush3.py [infohash] for testing?

@hinderaker
Copy link
Author

Yes, and it works fine during testing. Its when executed by deluged it fails.

@ckcr4lyf
Copy link
Owner

ckcr4lyf commented Jan 15, 2023

Gotcha. Are you using some kind of docker setup?

Could you add a debug line in delugePush3.py : On line 66 (here:

delugeConsoleResult = os.popen(delugeCommand).read()
lines = delugeConsoleResult.split('\n')
) , add a line:

print(lines)

Add the line at the same indentation as line 65. That should print out what you got, might help in tracing the problem

@hinderaker
Copy link
Author

It sure did help! Got the following error:
deluge.common:129 ] Unable to use default config directory, exiting... ([Errno 13] Permission denied: '/root.config')", '']'

This is the exact same issue as #6. I did the same chmod -R 0777 /root and its now functioning properly. Sorry for wasting your time! :/

@hinderaker
Copy link
Author

hinderaker commented Jan 15, 2023

It requires permission to create /root/.config/deluge/ui.conf

{                                                                                                                                   
    "file": 1,                                                                                                                      
    "format": 1                                                                                                                     
}{                                                                                                                                  
    "default_ui": "gtk"                                                                                                             
}      

@ckcr4lyf
Copy link
Owner

I did the same chmod -R 0777 /root and its now functioning properly. Sorry for wasting your time! :/

Not at all! Glad you got it working. And thanks for highlighting the issue, I shall highlight the permission possible fix in a docker setup section. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants