You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just using this library and noticed when dumping to stdout by using the "-" option there is the following error:
[2020-09-11 08:16:42,305] options -> {}
[2020-09-11 08:16:42,317] Transferred 31 bytes
[2020-09-11 08:16:42,318] Set remote port for session to 1136
[2020-09-11 08:16:42,318] Received DAT from server
[2020-09-11 08:16:42,318] Handling DAT packet - block 1
[2020-09-11 08:16:42,318] Sending ack to block 1
Traceback (most recent call last):
File "/root/.local/bin/tftpy_client.py", line 136, in <module>
main()
File "/root/.local/bin/tftpy_client.py", line 120, in main
tclient.download(options.download,
File "/root/.local/lib/python3.8/site-packages/tftpy/TftpClient.py", line 58, in download
self.context.start()
File "/root/.local/lib/python3.8/site-packages/tftpy/TftpContexts.py", line 402, in start
self.cycle()
File "/root/.local/lib/python3.8/site-packages/tftpy/TftpContexts.py", line 202, in cycle
self.state = self.state.handle(recvpkt, raddress, rport)
File "/root/.local/lib/python3.8/site-packages/tftpy/TftpStates.py", line 586, in handle
return self.handleDat(pkt)
File "/root/.local/lib/python3.8/site-packages/tftpy/TftpStates.py", line 182, in handleDat
self.context.fileobj.write(pkt.data)
TypeError: write() argument must be str, not bytes
Hello,
I was just using this library and noticed when dumping to stdout by using the "-" option there is the following error:
It appears to be caused by the following line
tftpy/tftpy/TftpContexts.py
Line 367 in af2f2fe
Probably it should be updated to:
I suspect the same issue applies to the input:
tftpy/tftpy/TftpContexts.py
Line 284 in af2f2fe
i.e. it should be updated to:
If you like, I can submit a PR to fix this?
The text was updated successfully, but these errors were encountered: