Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with delimiters
Hello everyone
I am quite stuck. i am trying to get a message from a TCP communication protocol, this message is converted in a list of strings and then into a list of float, The thing is that im getting an error because of the delimiters. here is my code

while True:

    message = conn.recv(BUFFER_SIZE)
    if not message:
    t1 = time.time()
    message = message.decode("utf-8")
    print("Raw message: {}".format(message))

    data = list(message.split(","))
    print("Data Size:{} ".format(len(data)))
MyNewData = []
    for item in data:
    print("The new list: {}".format(MyNewData))

#     data = list(map(float,message.split(",")))
    print("Size:{} ".format(len(data)))
now, if you post the raw message from line 8.... we may be able to help
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs


Possibly Related Threads…
Thread Author Replies Views Last Post
  Delimiters - How to skip some html tags from being translate Melcu54 0 297 May-26-2021, 06:21 AM
Last Post: Melcu54
  Parse String between 2 Delimiters and add as single list items lastyle 5 614 Apr-11-2021, 11:03 PM
Last Post: lastyle
  Split string between two different delimiters, with exceptions DreamingInsanity 2 658 Aug-24-2020, 08:23 AM
Last Post: DreamingInsanity
  Problem with delimiters johnprada 5 1,040 Jan-29-2020, 10:17 AM
Last Post: DeaD_EyE
  splitting a string with 2 different delimiters Skaperen 4 1,014 Dec-30-2019, 04:49 AM
Last Post: BamBi25
  Split a long string into other strings with no delimiters/characters krewlaz 4 986 Nov-15-2019, 02:48 PM
Last Post: ichabod801
  re.split multiple delimiters problem gw1500se 2 1,908 Jun-24-2019, 02:43 PM
Last Post: gw1500se
  Finding nested delimiters wfsteadman 4 1,734 Jan-22-2018, 07:23 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020