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

Data thread stopped #17

Open
djoey123 opened this issue Jun 13, 2020 · 2 comments
Open

Data thread stopped #17

djoey123 opened this issue Jun 13, 2020 · 2 comments

Comments

@djoey123
Copy link

djoey123 commented Jun 13, 2020

Hi,

I got this error.

FLEX|2020-06-13 16:40:37|1600/2/K/A|10.029|002029568 001423381 001423001 001420999|ALN|B1 AMBU 18181 Weegje 3295CT 's-Gravendeel SGRAVD bon 71858
POST: {
"body": "B1 AMBU 18181 Weegje 3295CT 's-Gravendeel SGRAVD bon 71858",
"capcodes": [
"AMBU"
],
"groupid": "001420999|ALN|B1",
"is_posted": false,
"priority": 3,
"receivers": "AMBU",
"sender": 0,
"timereceived": 1592066437.2198057,
"timestamp": "16:40:37|1600/2/K/A|10.029|002029568 001423381"
}
dataThreadFunc::Error in line: <class 'IndexError'> p2000.py 606 list index out of range
Data thread stopped

Any idea why?

@djoey123
Copy link
Author

I see the format is something different then expected

@djoey123
Copy link
Author

line_data = line.split('|')
flex = line_data[0]
timestamp = line_data[1]
message = line_data[6]
groupid = line_data[3].strip()
capcode = line_data[4] # line[43:52].strip()

This fixes for me :)

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