Feb-25-2019, 02:41 PM
This is the error i got from the terminal.
server.py
Server Created
Socket bind complete
Server now listening
Connected with 127.0.0.1:51150
Client> b''
Traceback (most recent call last):
File "./server.py", line 34, in <module>
string = reqCommand.split(' ')
TypeError: a bytes-like object is required, not 'str'
client.py
Instruction
"FileUpload [filename]" to send the file the server
"FileDownload [filename]" to download the file from the server
"ls" to list all files in this directory
"lls" to list all files in the server
"IndexGet shortlist <starttimestamp> <endtimestamp>" to list the files modified in mentioned timestamp.
"IndexGet longlist" similar to shortlist but with complete file listing
"FileHash verify <filename>" checksum of the modification of the mentioned file.
"quit" to exit
lls
h> Traceback (most recent call last):
File "./client.py", line 185, in <module>
serverList('lls')
File "./client.py", line 150, in serverList
socket1.send(commandName)
TypeError: a bytes-like object is required, not 'str'
This are the errors from both codes.
server.py
Server Created
Socket bind complete
Server now listening
Connected with 127.0.0.1:51150
Client> b''
Traceback (most recent call last):
File "./server.py", line 34, in <module>
string = reqCommand.split(' ')
TypeError: a bytes-like object is required, not 'str'
client.py
Instruction
"FileUpload [filename]" to send the file the server
"FileDownload [filename]" to download the file from the server
"ls" to list all files in this directory
"lls" to list all files in the server
"IndexGet shortlist <starttimestamp> <endtimestamp>" to list the files modified in mentioned timestamp.
"IndexGet longlist" similar to shortlist but with complete file listing
"FileHash verify <filename>" checksum of the modification of the mentioned file.
"quit" to exit
lls
h> Traceback (most recent call last):
File "./client.py", line 185, in <module>
serverList('lls')
File "./client.py", line 150, in serverList
socket1.send(commandName)
TypeError: a bytes-like object is required, not 'str'
This are the errors from both codes.