Jul-23-2018, 08:06 AM
Hello all
New to the forums, about six months experience with simple(ish) Python scripting.
I've got a bit of an issue that isn't with code specifically but seems to be to do with a set of .txt files. Basically, we have a BMS that outputs temperature readings line by line in the form of a simple .txt file and I want to read these lines and store them as a list in Python. The code for this is simple and works fine on every .txt file I've tested EXCEPT for these generated by the BMS.
On the surface the .txt output looks normal but returns blank lines when interrogated. If I copy/paste the lines into a fresh .txt file the data reads fine. The only difference I can see between the BMS generated .txt file and the copy/pasted version is the file size; the file size halves when the data is copy/pasted to a fresh file.
I'm sure there's something non standard about these BMS generated .txt files but I can't figure out what it is. Ideally I need someone more experienced to look at the files to see if they can spot what's different about them but I cannot attached files to this forum post.
Anyone seen something like this before? Any ideas on how I could get a sample of one of these .txt files across for examination?
Thanks
CP
New to the forums, about six months experience with simple(ish) Python scripting.
I've got a bit of an issue that isn't with code specifically but seems to be to do with a set of .txt files. Basically, we have a BMS that outputs temperature readings line by line in the form of a simple .txt file and I want to read these lines and store them as a list in Python. The code for this is simple and works fine on every .txt file I've tested EXCEPT for these generated by the BMS.
On the surface the .txt output looks normal but returns blank lines when interrogated. If I copy/paste the lines into a fresh .txt file the data reads fine. The only difference I can see between the BMS generated .txt file and the copy/pasted version is the file size; the file size halves when the data is copy/pasted to a fresh file.
I'm sure there's something non standard about these BMS generated .txt files but I can't figure out what it is. Ideally I need someone more experienced to look at the files to see if they can spot what's different about them but I cannot attached files to this forum post.
Anyone seen something like this before? Any ideas on how I could get a sample of one of these .txt files across for examination?
Thanks
CP