damianfekete / stdfparser Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/stdfparser
License: GNU General Public License v3.0
Automatically exported from code.google.com/p/stdfparser
License: GNU General Public License v3.0
What steps will reproduce the problem?
1. Run test.py on an STFD that I'm not going to supply.
2.
3.
What is the expected output? What do you see instead?
Traceback (most recent call last):
File "test.py", line 33, in <module>
do()
File "test.py", line 31, in do
x.parse(sys.argv[1:])
File "stdfparser.py", line 225, in parse
self.process(buf, (typ, sub))
File "stdfparser.py", line 173, in process
self.data[i[0]], buf = self.get_parse_func(tmp)(tmp, buf)
File "stdfparser.py", line 472, in _get_Kx
item, buf = func(item_format, buf)
File "stdfparser.py", line 295, in _get_Nn
return (r, buf[1])
IndexError: string index out of range
What version of the product are you using? On what operating system?
stdfparser-1.0.2
Python 2.6.6
Linux
Please provide any additional information below.
In the function _get_Nn, it's clear it doesn't handle the case len(buf) == 1.
Original issue reported on code.google.com by [email protected]
on 28 Jan 2013 at 10:30
What steps will reproduce the problem?
1. Reading any STDF with test.py
2.
3.
What is the expected output? What do you see instead?
-Expect to see valid HEAD_NUM & SITE_NUM for PIR.
-SITE_NUM in PIR displays as None.
What version of the product are you using? On what operating system?
stdfparser-1.0.2, Windows 7
Please provide any additional information below.
Error is due to function "_get_Un" in stdfparser.py. When reading format "U1",
function returns None if buffer length is < 2.
Workaround/Fix.
Edit line 315 to:
if len(buf) < 1:
Original issue reported on code.google.com by [email protected]
on 1 Nov 2013 at 9:26
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.