Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating animation: Error in .x[["expr"]][[i]]: subscript out of bounds #119

Open
PhilipFaure opened this issue Aug 23, 2023 · 5 comments

Comments

@PhilipFaure
Copy link

Hi Jakob

Hope you're keeping well,

I keep getting this error when using the animate_frames() function and I'm not sure what to do. Please help.

Rendering animation...
Number of frames: 1270 + 25 to add ≈ 1s of pause at the end
Approximated animation duration: ≈ 51.8s at 25 fps for 1295 frames
|===========================| 99% ~01m 18s
Error: Error creating animation: Error in .x[["expr"]][[i]]: subscript out of bounds
In addition: Warning message:
In dir.create(frames_dir, recursive = T) :
'C:\Users\xxxxxxx\AppData\Local\Temp\RtmpoRVYVw\moveVis\frames' already exists

@avery-shawler
Copy link

Hi Philip - I was wondering if you ever got this issue resolved? I am trying to update a MoveVis animation from 2 years ago and am also getting this error

@colbyslezak
Copy link

Did anyone get this issue fixed, this started to appear for me all of a sudden. Thanks

@avery-shawler
Copy link

I figured out a work around, which worked, but then I was having issues with the basemaps (only some tiles were showing up)

So for some reason the default out_file was not working, so I tried 2 things that worked for me (at least back in Oct 2023):

animate_frames(frames, out_file = tempfile(fileext = ".mov"))

animate_frames(frames, out_file = "/Users/xxxxx/Desktop/animations/temp/xxxx.mov")

hopefully this works for you! Let me know if you get any of the basemaps to work (and if so, which ones!)

@colbyslezak
Copy link

Thank you! I did get the basemaps to work, I went to mapbox https://www.mapbox.com/ and registered for a token and used the following code and it worked for me!

frames <- frames_spatial(m, map_token= "tokengoeshere", map_service = "mapbox", map_type = "light", alpha = 0.5, path_legend = FALSE, trace_show = TRUE, trace_colour = "grey", tail_colour = "grey") %>%
add_labels(x = "Longitude", y = "Latitude") %>% # add some customization, such as axis labels
add_northarrow() %>%
add_scalebar() %>%
add_timestamps(type = "label") %>%
add_progress()

@avery-shawler
Copy link

Thanks for sharing! That mostly worked for me - I'm just missing a couple basemap tiles (before I was missing most of the tiles)! Not sure how to get the last couple tiles loaded, but this should be fine for now. Thanks again!

Screenshot 2024-03-18 at 9 38 35 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants