I am trying to export tlog files using mavlogdump.py but get an error:
C:\Users\bruger\Documents\QGroundControl\Telemetry>mavlogdump.py --types=ATTITUDE --format=csv 2019-06-30\14-24-19.tlog > test.csv
Traceback (most recent call last):
File “C:\Python37\lib\site-packages\pymavlink\mavutil.py”, line 913, in init
self.port = serial.Serial(self.device, 1200, timeout=0,
AttributeError: module ‘serial’ has no attribute ‘Serial’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “C:\Python37\Scripts\mavlogdump.py”, line 73, in
zero_time_base=args.zero_time_base)
File “C:\Python37\lib\site-packages\pymavlink\mavutil.py”, line 1638, in mavlink_connection
force_connected=force_connected)
File “C:\Python37\lib\site-packages\pymavlink\mavutil.py”, line 915, in init
except serial.SerialException as e:
AttributeError: module ‘serial’ has no attribute ‘SerialException’
I believe you might have done pip install serial instead of pip install pyseral. If this is the case, do pip uninstall serial to remove the wrong package and then pip install pyserial to install the correct one.
C:\Users\bruger\Documents\QGroundControl\Telemetry>mavlogdump.py --types=ATTITUDE --format=csv 2019-06-30\14-24-19.tlog > test.csv
Traceback (most recent call last):
File “C:\Python37\Scripts\mavlogdump.py”, line 73, in
zero_time_base=args.zero_time_base)
File “C:\Python37\lib\site-packages\pymavlink\mavutil.py”, line 1638, in mavlink_connection
force_connected=force_connected)
File “C:\Python37\lib\site-packages\pymavlink\mavutil.py”, line 917, in init
raise e
File “C:\Python37\lib\site-packages\pymavlink\mavutil.py”, line 914, in init
dsrdtr=False, rtscts=False, xonxoff=False)
File “C:\Python37\lib\site-packages\serial\serialwin32.py”, line 31, in init
super(Serial, self).init(*args, **kwargs)
File “C:\Python37\lib\site-packages\serial\serialutil.py”, line 240, in init
self.open()
File “C:\Python37\lib\site-packages\serial\serialwin32.py”, line 62, in open
raise SerialException(“could not open port {!r}: {!r}”.format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port ‘2019-06-30\14-24-19.tlog’: FileNotFoundError(2, ‘Den angivne sti blev ikke fundet.’, None, 3)
The code seems to be failing to detect the file here
I’d also suggest trying to use mavlogdump.py --types=ATTITUDE --format=csv "2019-06-30 14-24-19.tlog" > test.csv with quotes so that backslash is not needed. This way you should not need to rename the file.