Replies: 1 comment
-
I think your file should be imported via the web interface (Google Phone Takeout): ![]() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've tried to import the google maps timeline. I exported it by my android phone in system settings -> location -> timeline. I get a .json file and followed the "Import existing data" steps. but with the "bundle exec rake import:big_file" command it seems to fails, at "Imports" I can find my import but with 0 records:
'/var/app # bundle exec rake import:big_file['tmp/imports/Records.json','[email protected]'] [dotenv] Set DATABASE_PORT [dotenv] Loaded .env.development 2024-12-29T17:27:20.388Z pid=1365 tid=3b9 INFO: Sidekiq 7.3.7 connecting to Redis with options {:size=>10, :pool_name=>"internal", :url=>"redis://dawarich_redis:6379/0"} I, [2024-12-29T17:27:20.390221 #1365] INFO -- : Enqueued Cache::CleaningJob (Job ID: d281ec92-d601-4b5b-99cd-aea340217e2f) to Sidekiq(default) I, [2024-12-29T17:27:20.390660 #1365] INFO -- : ↳ config/environment.rb:10:in
I, [2024-12-29T17:27:20.391580 #1365] INFO -- : Enqueued Cache::PreheatingJob (Job ID: 15dc9dad-bd0c-400d-b4f5-11e9d6b03226) to Sidekiq(default)
I, [2024-12-29T17:27:20.392211 #1365] INFO -- : ↳ config/environment.rb:13:in
<main>' D, [2024-12-29T17:27:20.885998 #1365] DEBUG -- : User Load (43.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = $1 LIMIT $2 [["email", "[email protected]"], ["LIMIT", 1]] D, [2024-12-29T17:27:20.886345 #1365] DEBUG -- : ↳ app/services/tasks/imports/google_records.rb:9:in
initialize'D, [2024-12-29T17:27:20.996775 #1365] DEBUG -- : TRANSACTION (0.2ms) BEGIN
D, [2024-12-29T17:27:21.001583 #1365] DEBUG -- : ↳ app/services/tasks/imports/google_records.rb:26:in
create_import' D, [2024-12-29T17:27:21.002516 #1365] DEBUG -- : Import Create (6.0ms) INSERT INTO "imports" ("name", "user_id", "source", "created_at", "updated_at", "raw_points", "doubles", "processed", "raw_data", "points_count") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["name", "tmp/imports/Records.json"], ["user_id", 1], ["source", 2], ["created_at", "2024-12-29 17:27:20.995410"], ["updated_at", "2024-12-29 17:27:20.995410"], ["raw_points", 0], ["doubles", 0], ["processed", 0], ["raw_data", nil], ["points_count", 0]] D, [2024-12-29T17:27:21.002935 #1365] DEBUG -- : ↳ app/services/tasks/imports/google_records.rb:26:in
create_import'D, [2024-12-29T17:27:21.007522 #1365] DEBUG -- : TRANSACTION (4.3ms) COMMIT
D, [2024-12-29T17:27:21.007800 #1365] DEBUG -- : ↳ app/services/tasks/imports/google_records.rb:26:in
create_import' D, [2024-12-29T17:27:21.007977 #1365] DEBUG -- : Importing tmp/imports/Records.json for [email protected], file size is 78269714... This might take a while, have patience! rake aborted! NoMethodError: undefined method
each' for nil (NoMethodError)/var/app/app/services/tasks/imports/google_records.rb:34:in
schedule_import_jobs' /var/app/app/services/tasks/imports/google_records.rb:19:in
call'/var/app/lib/tasks/import.rake:9:in
block (2 levels) in <main>' /var/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in
<top (required)>'/var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:58:in
load' /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:58:in
kernel_load'/var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:23:in
run' /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli.rb:451:in
exec'/var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/command.rb:28:in
run' /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in
invoke_command'/var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor.rb:527:in
dispatch' /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli.rb:34:in
dispatch'/var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/base.rb:584:in
start' /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli.rb:28:in
start'/var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/exe/bundle:28:in
block in <top (required)>' /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/friendly_errors.rb:117:in
with_friendly_errors'/var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/exe/bundle:20:in
<top (required)>' /usr/local/bundle/bin/bundle:25:in
load'/usr/local/bundle/bin/bundle:25:in
<main>' Tasks: TOP => import:big_file (See full trace by running task with --trace)
the .json-file is built up like this:
{ "semanticSegments": [ { "startTime": "2014-04-03T19:00:00.000+02:00", "endTime": "2014-04-03T21:30:00.000+02:00", "timelinePath": [ { "point": "48.8566°, 2.3522°", "time": "2014-04-03T20:45:00.000+02:00" } ] }, { "startTime": "2014-04-03T21:31:00.000+02:00", "endTime": "2014-04-04T06:45:00.000+02:00", "startTimeTimezoneUtcOffsetMinutes": 120, "endTimeTimezoneUtcOffsetMinutes": 120, "visit": { "hierarchyLevel": 0, "probability": 0.6399999856948853, "topCandidate": { "placeId": "ChIJ1-x1dp2x5kcR5HeaTfdYJvQ", "semanticType": "HOME", "probability": 0.9788995981216431, "placeLocation": { "latLng": "48.8567°, 2.3515°" } } } }, { "startTime": "2014-04-03T21:30:00.000+02:00", "endTime": "2014-04-04T00:15:00.000+02:00", "timelinePath": [ { "point": "48.8606°, 2.3376°", "time": "2014-04-03T21:45:00.000+02:00" }, { "point": "48.8572°, 2.3508°", "time": "2014-04-03T22:00:00.000+02:00" }, { "point": "48.8569°, 2.3519°", "time": "2014-04-03T22:20:00.000+02:00" }, { "point": "48.8571°, 2.3511°", "time": "2014-04-03T22:30:00.000+02:00" } ] }, { "startTime": "2014-04-04T06:00:00.000+02:00", "endTime": "2014-04-04T08:15:00.000+02:00", "timelinePath": [ { "point": "48.8570°, 2.3523°", "time": "2014-04-04T07:00:00.000+02:00" }, { "point": "48.8607°, 2.3368°", "time": "2014-04-04T07:10:00.000+02:00" }, { "point": "48.8574°, 2.3520°", "time": "2014-04-04T07:25:00.000+02:00" }, { "point": "48.8593°, 2.3432°", "time": "2014-04-04T07:40:00.000+02:00" }, { "point": "48.8575°, 2.3515°", "time": "2014-04-04T07:50:00.000+02:00" } ] }, { "startTime": "2014-04-04T06:45:00.000+02:00", "endTime": "2014-04-04T13:00:00.000+02:00", "startTimeTimezoneUtcOffsetMinutes": 120, "endTimeTimezoneUtcOffsetMinutes": 120, "activity": { "start": { "latLng": "48.8568°, 2.3517°" }, "end": { "latLng": "48.8573°, 2.3513°" }, "distanceMeters": 24.305197715759277, "topCandidate": { "type": "UNKNOWN_ACTIVITY_TYPE", "probability": 0.0 } } },
Beta Was this translation helpful? Give feedback.
All reactions