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

ValueError when trying to download using DCC #198

Open
ghost opened this issue Jun 10, 2022 · 2 comments
Open

ValueError when trying to download using DCC #198

ghost opened this issue Jun 10, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 10, 2022

DEBUG:irc.client:command: privnotice, source: TS-APP|US|P|39503!root@The.Source.org, target: <USERNAME>, arguments: ['** Sending you pack #169 ("Tangible.Software.Solutions.Java.to.Python.Converter.Premium.Edition.v21.8.31-DVT.tar"), which is 4.0MB. (resume supported)'], tags: None
DEBUG:irc.client:_dispatcher: privnotice
DEBUG:irc.client:FROM SERVER: :TS-APP|US|P|39503!root@The.Source.org PRIVMSG <USERNAME>:☺DCC SEND Tangible.Software.Solutions.Java.to.Python.Converter.Premium.Edition.v21.8.31-DVT.tar 1650529690 0 4157440 65☺
DEBUG:irc.client:_dispatcher: all_raw_messages
DEBUG:irc.client:command: ctcp, source: TS-APP|US|P|39503!root@The.Source.org, target: <USERNAME>, arguments: ['DCC', 'SEND Tangible.Software.Solutions.Java.to.Python.Converter.Premium.Edition.v21.8.31-DVT.tar 1650529690 0 4157440 65'], tags: None
DEBUG:irc.client:_dispatcher: ctcp
Traceback (most recent call last):
  File "C:\Users\X\Documents\Programming\Projects\X\main.py", line 91, in <module>
    main()
  File "C:\Users\X\Documents\Programming\Projects\X\main.py", line 87, in main
    c.start()
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 1202, in start
    self.reactor.process_forever()
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 846, in process_forever
    consume(repeatfunc(one))
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\more_itertools\recipes.py", line 146, in consume
    deque(iterator, maxlen=0)
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 827, in process_once
    self.process_data(in_)
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 792, in process_data
    conn.process_data()
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 268, in process_data
    self._process_line(line)
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 299, in _process_line
    handler(arguments, command, source, tags)
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 329, in _handle_message
    self._handle_event(event)
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 376, in _handle_event
    self.reactor._handle_event(self, event)
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 922, in _handle_event
    result = handler.callback(connection, event)
  File "C:\Users\X\Documents\Programming\Projects\X\lib\site-packages\irc\client.py", line 1159, in _dispatcher
    method(connection, event)
  File "C:\Users\X\Documents\Programming\Projects\X\main.py", line 34, in on_ctcp
    command, filename, peer_address, peer_port, size = parts
ValueError: too many values to unpack (expected 5)

Using the DCC receive example with modified code:

def on_welcome(self, connection, event):
		self.connection.privmsg("NickServ", "IDENTIFY <PASS>")
		self.connection.join("#THE.SOURCE.NOSPAM")

	def on_privmsg(self, connection, event):
		self.connection.privmsg("TS-APP|US|P|39503", "xdcc send #169")
@ghost
Copy link
Author

ghost commented Jun 10, 2022

Update: I've changed the code from command, filename, peer_address, peer_port, size = parts to just referring to the index value in the parts list which works, however I'm now getting a irc.client.DCCConnectionError: Couldn't connect to socket: [WinError 10049] The requested address is not valid in its context

@jaraco
Copy link
Owner

jaraco commented Jul 15, 2022

I don't have access to main.py. Can you provide a bit more context?

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

1 participant