Open deepred86 opened 3 years ago
You don't seem to be doing anything wrong from what I can see, the code you posted seems to work on my end.
Maybe make sure you have the newest versions of both puffotter
(0.17.2) and xdcc-dl
(5.1.0) installed via pip. I can't really come up with any explanation what could be wrong otherwise right now.
They were updated so I reinstalled them just to double check, now I get:
/usr/bin/python3.8 /home/user/PycharmProjects/pythonProject/main.py
Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/irc/client.py", line 186, in connect
self.socket = self.connect_factory(self.server_address)
File "/home/user/.local/lib/python3.8/site-packages/irc/connection.py", line 49, in connect
sock.connect(server_address)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/xdcc_dl/xdcc/XDCCClient.py", line 179, in download
self.connect(
File "/home/user/.local/lib/python3.8/site-packages/irc/client.py", line 1166, in connect
self.connection.connect(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/jaraco/functools.py", line 456, in wrapper
return method(self, *args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/irc/client.py", line 188, in connect
raise ServerConnectionError("Couldn't connect to socket: %s" % ex)
irc.client.ServerConnectionError: Couldn't connect to socket: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/PycharmProjects/pythonProject/main.py", line 9, in <module>
download_packs(search_results)
File "/home/user/.local/lib/python3.8/site-packages/xdcc_dl/xdcc/__init__.py", line 61, in download_packs
client.download()
File "/home/user/.local/lib/python3.8/site-packages/xdcc_dl/xdcc/XDCCClient.py", line 217, in download
self.timeout_watcher_thread.join()
File "/usr/lib/python3.8/threading.py", line 1006, in join
raise RuntimeError("cannot join thread before it is started")
RuntimeError: cannot join thread before it is started
Process finished with exit code 1
Also, what would be the best way to select a random item from the results? I can't iterate it using a for loop or a random.choice()
I'm honestly not sure what the issue could be here. Maybe also update the irc
package to the newest version. Does this also occur when using the command line tool xdcc-browse
?
If so, it could be that there's some issue on a network level, maybe firewall settings or IP bans?
Regarding picking a random item from the results: That should be possible using random.choice(), since the results should be a list of XDCCPack objects. I don't quite know why it wouldn't work.
Hi I'm unable to download a pack searched using XDCC_EU Search engine
I get:
Even when using your example:
I get:
I also tried to add a random.choice() in order to select a random choice from the packs list returned by the SearchEngine function without success. Am I doing something wrong or is it a bug?