BluEye-Robotics / blueye.sdk

A Python package for remote control of Blueye underwater drones.
GNU Lesser General Public License v3.0
17 stars 4 forks source link

Fixed valueError when retrieving logs. #125

Closed bcwein closed 1 year ago

bcwein commented 1 year ago

When executing print(myDrone.logs) I received the following error:

ValueError: Invalid isoformat string: '2021-04-30T11:23:26Z'

Which according to this thread is due to fromisoformat not being the proper method for parsing arbitrary isostrings.

After replacing datetime.fromisoformat(timestamp) with datetime.strptime(timestamp, "%Y-%m-%dT%H:%M:%S.%f%z") my issue was resolved.

Description

No existing issue was registered before this. #### Checklist before merging - [x] Run the tests while connected to a drone - [x] Update the package version according to [semver](https://semver.org/)
bcwein commented 1 year ago

Hi @sindrehan

It is my pleasure to participate whenever I use the SDK.

Not 100% sure if I have found the correct OS number, but according to my app the version on the drone is 3.1.52-master which is dated 08.02.2023.

This makes sense as I updated the drone before the dive on May 2nd. It was used last time in September 2022.

Could this also explain the missing log-files from the drone? When I tried to extract them using the SDK, they were missing. This is possibly more appropriate to file as a separate issue?

sindrehan commented 1 year ago

The reason for missing log-files is due to lack of support for the new binary format (introduced with Blunux v3.0.47). You can follow issue #126 if you wish to keep an eye on the progress.