Replies: 2 comments 4 replies
-
Here is the screenshot. |
Beta Was this translation helpful? Give feedback.
-
Hello, I also have an issue while importing data from TeslaFi. Displayed error is this one: I tested several times but I'm still unable to import those files. When I try again to import them, the "import" button seems to be not working. No error, no "work in progress" icon, and when I go to the log files, I have the same error with different "eid: XXXXX". Could you please help? Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have two issues when trying to import a TeslaFi backup into Teslamate:
the first is, that the vehicle-id in the export varies and looks the attached screenshot, the first occurrence looks like a binary value, the rest like values in ascending order.
When I replace the vehicle ID with a 1, I get the following error on the import:
{{:badmatch, {:error, #Ecto.Changeset< action: :insert, changes: %{ date: ~U[2024-11-12 14:15:44.000000Z], speed: 119, power: 43, latitude: Decimal.new("50.162142"), longitude: Decimal.new("8.91141"), usable_battery_level: 91, driver_temp_setting: Decimal.new("21.0"), fan_status: 1, inside_temp: Decimal.new("21.0"), outside_temp: Decimal.new("11.5"), passenger_temp_setting: Decimal.new("21.0"), odometer: 13.697001, ideal_battery_range_km: Decimal.new("475.69"), rated_battery_range_km: Decimal.new("475.69"), est_battery_range_km: Decimal.new("407.32") }, errors: [ battery_level: {"is invalid", [type: :integer, validation: :cast]} ], data: #TeslaMate.Log.Position<>, valid?: false, ... >}}, [ {TeslaMate.Vehicles.Vehicle, :"-handle_event/4-fun-3-", 4, [file: ~c"lib/teslamate/vehicles/vehicle.ex", line: 756]}, {Ecto.Adapters.SQL, :"-checkout_or_transaction/4-fun-0-", 3, [file: ~c"lib/ecto/adapters/sql.ex", line: 1400]}, {DBConnection, :run_transaction, 4, [file: ~c"lib/db_connection.ex", line: 1756]}, {TeslaMate.Vehicles.Vehicle, :handle_event, 4, [file: ~c"lib/teslamate/vehicles/vehicle.ex", line: 748]}, {:gen_statem, :loop_state_callback, 11, [file: ~c"gen_statem.erl", line: 1397]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]} ]}
I checked the lines mentioned in the error but they do not look suspicious.
This is the content of the log on the original import file:
2024-11-19 12:23:03.726 [error] GenStateMachine TeslaMate.Import terminating
** (Ecto.Query.CastError) deps/ecto/lib/ecto/repo/queryable.ex:487: value
"1 1 0 0 0 0 1"
inwhere
cannot be cast to type :integer in query:from c0 in TeslaMate.Log.Car,
where: c0.vid == ^"1 1 0 0 0 0 1",
select: c0
(elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
(elixir 1.17.3) lib/enum.ex:1829: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
2024-11-19 12:23:05.381 [info] GET /import
2024-11-19 12:23:05.386 [info] Sent 200 in 4ms
2024-11-19 12:23:07.652 [info] Importing 1 file(s) ...
2024-11-19 12:23:07.654 [info] Starting logger for 'Sams'
2024-11-19 12:23:07.656 [error] GenStateMachine TeslaMate.Import terminating
** (Ecto.Query.CastError) deps/ecto/lib/ecto/repo/queryable.ex:487: value
"1 1 0 0 0 0 1"
inwhere
cannot be cast to type :integer in query:Does anyone have a clue what is going wrong here?
Thanks in advance for your help.
Many regards,
Thomas.
Beta Was this translation helpful? Give feedback.
All reactions