Comments (7)
I prefer the exception because it makes it clear the log is corrupt.
If you want to make it an option, that works for me as well.
from pyulog.
Thanks, that sounds good. I'll make a PR.
from pyulog.
Just to be clear, the defaut behaviour when parsing strings in pyulog currently is different for python 2 and python 3. Python2 silently ignores and python3 fails over. I think the default behaviour should report the error and print warning but not failover, keeping pyulog robust to external errors.
from pyulog.
I think the default behaviour should report the error and print warning but not failover, keeping pyulog robust to external errors.
There's a trade-off: if you have parsing errors, you cannot trust the data. Can you make it a parameter disable_parser_exceptions
to ULog(), and if True, set self._file_corrupt
instead of raising the exception?
from pyulog.
There's a trade-off: if you have parsing errors, you cannot trust the data.
While that's true, often log analysis comes down to recovering as much logged info from a logfile as possible - especially for crash logs. Only then you'd consider the matter of 'trustability' of the data. I can't imagine a scenario where a user expects a log parsing pipeline to stop midway and discard rest of the logged data because it encountered unexpected bytes (especially true if the corrupt bytes are not message identifiers, but string payload of message packets!).
Still unclear points to me in discussion are difference in python2 and python3 behavior, and whether ascii should be the default or utf-8.
Can you make it a parameter disable_parser_exceptions to ULog(), and if True, set self._file_corrupt instead of raising the exception?
Sounds like a good idea.
from pyulog.
Also note #40
from pyulog.
As I wrote I'm fine with making this configurable (the default can be either way). What's important to me is that we have the reporting of exceptions, both in Flight Review and the scripts.
Still unclear points to me in discussion are difference in python2 and python3 behavior, and whether ascii should be the default or utf-8.
Preferably utf-8.
from pyulog.
Related Issues (20)
- Conversion failed when I used ulog2kml HOT 9
- pyulog not extractting vehicle_air_data HOT 1
- Shift GPS data to make log location anonymous HOT 5
- unable to load px4 logs HOT 8
- Could it parse the initial senor data?
- Logging messages with a 'Tag' HOT 6
- Add data corruption handling HOT 7
- how to convert the csv file to matlab graphical data HOT 1
- ulog_params doesn't show parameter values HOT 3
- px4 replay request ulog_prams -d arguments HOT 2
- Parameter change wrong timestamp HOT 1
- pyulog PX4 log file read error when using ulog2csv HOT 9
- ulog2csv creating multiple files HOT 1
- not able to fin binary installed HOT 8
- log the IMU and PWM outputs with timestamp in pixhawk 4 mini HOT 1
- Using Python script instead of command line to parse ulog files HOT 2
- Description/Units of the various outputs HOT 1
- Request Script to Unroll sensor_gyro_fifo and sensor_accel_fifo
- KeyError: 'uint8_t[1169]' after `ulog.write_ulog(...)`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyulog.