StevenVB12 / patternize

An R package for quantifying color pattern variation
31 stars 8 forks source link

Error in abind::abind(landmarksArray, landmarksArray1, along = 3) #34

Open Humminglipe opened 2 years ago

Humminglipe commented 2 years ago

Hello Steven!

I'm trying to reproduce the code to analyze some birds photos. But I got an error when trying to do the alignment of the images, here's the code

IDlist <- tools::file_path_sans_ext(dir("D:/Proyecto de tesis/Imagenes/Recolorize/Ramphocelus/PNG", ".png")) imageList <- makeList(IDlist, type = "image", prepath = "D:/Proyecto de tesis/Imagenes/Recolorize/Ramphocelus/PNG", extension = ".png") listaLandmarks <- makeList(IDlist, type = "landmark", prepath = "D:/Proyecto de tesis/Imagenes/Recolorize/Ramphocelus/Landmarks", extension = ".txt") target <- listaLandmarks[['DSC_0067']] mask <- read.csv("D:/Proyecto de tesis/Imagenes/Recolorize/Ramphocelus/Mascaras/DSC_0067_mask.txt", header = FALSE)

imageList_aligned <- alignLan(imageList, listaLandmarks, transformRef = target, adjustCoords = TRUE, plotTransformed = 5, cartoonID = 'DSC_0067', maskOutline = mask, inverse = FALSE)

[1] "sample 1 DSC_0065 added to array" [1] "sample 2 DSC_0067 added to array" Error in abind::abind(landmarksArray, landmarksArray1, along = 3) : can only supply one list-valued argument for ...

Don't know if its an error on the files,

I'll appreciate your help,

Thanks! All my best, Felipe

StevenVB12 commented 2 years ago

Hi Felipe,

I’ve heard about this error a couple of times now. It occurs for R version 4.2.1 and I pushed an update that github that should fix it. Could you either revert back to R4.1.1 or update patternize through github and let me know if you still get the error?

Thanks,

Steven

From: Humminglipe @.> Sent: Thursday, September 15, 2022 6:27 PM To: StevenVB12/patternize @.> Cc: Subscribed @.***> Subject: [StevenVB12/patternize] Error in abind::abind(landmarksArray, landmarksArray1, along = 3) (Issue #34)

Hello Steven!

I'm trying to reproduce the code to analyze some birds photos. But I got an error when trying to do the alignment of the images, here's the code

IDlist <- tools::file_path_sans_ext(dir("D:/Proyecto de tesis/Imagenes/Recolorize/Ramphocelus/PNG", ".png")) imageList <- makeList(IDlist, type = "image", prepath = "D:/Proyecto de tesis/Imagenes/Recolorize/Ramphocelus/PNG", extension = ".png") listaLandmarks <- makeList(IDlist, type = "landmark", prepath = "D:/Proyecto de tesis/Imagenes/Recolorize/Ramphocelus/Landmarks", extension = ".txt") target <- listaLandmarks[['DSC_0067']] mask <- read.csv("D:/Proyecto de tesis/Imagenes/Recolorize/Ramphocelus/Mascaras/DSC_0067_mask.txt", header = FALSE)

imageList_aligned <- alignLan(imageList, listaLandmarks, transformRef = target, adjustCoords = TRUE, plotTransformed = 5, cartoonID = 'DSC_0067', maskOutline = mask, inverse = FALSE)

[1] "sample 1 DSC_0065 added to array" [1] "sample 2 DSC_0067 added to array" Error in abind::abind(landmarksArray, landmarksArray1, along = 3) : can only supply one list-valued argument for ...

Don't know if its an error on the files,

I'll appreciate your help,

Thanks! All my best, Felipe

— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/34, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC47B434UI36N3IJ3UJDV6NE6VANCNFSM6AAAAAAQNR67GA. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

Humminglipe commented 2 years ago

Thanks for your response Steve, I tried both options, none of them worked. The same issue stills appearing

StevenVB12 commented 2 years ago

Hi,

Would you mind sending me the code you are running with a few of your images and other needed files to run your code? I would first like to see if it works for me.

Thank you,

Steven

From: Humminglipe @.> Sent: Monday, September 19, 2022 11:58 PM To: StevenVB12/patternize @.> Cc: Steven M. Van Belleghem @.>; Comment @.> Subject: Re: [StevenVB12/patternize] Error in abind::abind(landmarksArray, landmarksArray1, along = 3) (Issue #34)

Thanks for your response Steve, I tried both options, none of them worked. The same issue stills appearing

— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/34#issuecomment-1251606135, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC47K7PDYTVXQHTEEYD3V7DOYHANCNFSM6AAAAAAQNR67GA. You are receiving this because you commented.Message ID: @.**@.>>

StevenVB12 commented 2 years ago

I think I fixed the problem. Could you please download again through Github and let me know.

Thanks,

Steven

From: Humminglipe @.> Sent: Monday, September 19, 2022 11:58 PM To: StevenVB12/patternize @.> Cc: Steven M. Van Belleghem @.>; Comment @.> Subject: Re: [StevenVB12/patternize] Error in abind::abind(landmarksArray, landmarksArray1, along = 3) (Issue #34)

Thanks for your response Steve, I tried both options, none of them worked. The same issue stills appearing

— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/34#issuecomment-1251606135, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC47K7PDYTVXQHTEEYD3V7DOYHANCNFSM6AAAAAAQNR67GA. You are receiving this because you commented.Message ID: @.**@.>>

StuntsPT commented 2 years ago

I had the same issue, but I can confirm that using the latest master solves the problem for me! So I guess bcb0f02 fixes the issue? Thank you very much for looking into it!

Best,

Francisco

Humminglipe commented 2 years ago

It worked! Thanks Steven!

C-G-L commented 2 years ago

Hi Im still getting the same issue. I am on R 4.2.1, working with the sample data, and getting the abind error. I've uninstalled and reinstalled from github but to no avail.

StevenVB12 commented 2 years ago

Could you share me your files and script for me to troubleshoot?

Many thanks,

Steven

-------- Original message -------- From: C-G-L @.> Date: 9/26/22 8:12 PM (GMT+01:00) To: StevenVB12/patternize @.> Cc: "Steven M. Van Belleghem" @.>, Comment @.> Subject: Re: [StevenVB12/patternize] Error in abind::abind(landmarksArray, landmarksArray1, along = 3) (Issue #34)

Hi Im still getting the same issue. I am on R 4.2.1, working with the sample data, and getting the abind error. I've uninstalled and reinstalled from github but to no avail.

— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/34#issuecomment-1258424411, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC42YVRU7PVSXSO47M43WAHRQFANCNFSM6AAAAAAQNR67GA. You are receiving this because you commented.Message ID: @.***>

C-G-L commented 2 years ago

Fixed it! I had to reinstall some packages to get it to work. I dont really know what the problem was. Thanks for the quick response Steven. Much appreciated!

StevenVB12 commented 2 years ago

Awesome!

-------- Original message -------- From: C-G-L @.> Date: 9/26/22 8:29 PM (GMT+01:00) To: StevenVB12/patternize @.> Cc: "Steven M. Van Belleghem" @.>, Comment @.> Subject: Re: [StevenVB12/patternize] Error in abind::abind(landmarksArray, landmarksArray1, along = 3) (Issue #34)

Fixed it! I had to reinstall some packages to get it to work. I dont really know what the problem was. Thanks for the quick response Steven. Much appreciated!

— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/34#issuecomment-1258442999, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC44JWVA2QVQK2G4QQ5TWAHTRJANCNFSM6AAAAAAQNR67GA. You are receiving this because you commented.Message ID: @.***>

StevenVB12 commented 2 years ago

Fantastic. Thanks for letting me know!

Steven

From: Francisco Pina-Martins @.> Sent: Wednesday, September 21, 2022 12:32 AM To: StevenVB12/patternize @.> Cc: Steven M. Van Belleghem @.>; Comment @.> Subject: Re: [StevenVB12/patternize] Error in abind::abind(landmarksArray, landmarksArray1, along = 3) (Issue #34)

I had the same issue, but I can confirm that using the latest master solves the problem for me! So I guess bcb0f02https://github.com/StevenVB12/patternize/commit/bcb0f02055f9bafd24b67b0143e3fe0d902b6b33 fixes the issue? Thank you very much for looking into it!

Best,

Francisco

— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/34#issuecomment-1252983351, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC4267SWZOJURS3GIFVDV7I3MXANCNFSM6AAAAAAQNR67GA. You are receiving this because you commented.Message ID: @.**@.>>

aphanotus commented 1 year ago

Hello, Steven. First, thanks for developing this package. I am excited to try it out for several projects. Someone I am teaching with introduced it to our students, and unfortunately we encountered this error too. so I am trying to sort it out. I've made sure we're all using the latest GitHub versions of patternize, raster, abind, etc. However, we all get the same error referencing abind.

I tried implementing the fix noted above manually and then assigning the modified function to the patternize namespace. However, this led to another issue

Error in x$.self$finalize() : attempt to apply non-function
In addition: Warning messages:
1: [rast] unknown extent 
2: [rast] unknown extent 
3: [rast] unknown extent 
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'extent': incorrect number of dimensions

So I've reached the end of what I think I can try. Any advice?

StevenVB12 commented 1 year ago

Hi Dave,

Sorry you’re still experiencing problems. Would you mind sharing me your code and some of your images? I will try running it on my end first to see everything works fine or not.

Best wishes,

Steven

From: Dave Angelini @.> Sent: Sunday, 15 January 2023 21:03 To: StevenVB12/patternize @.> Cc: Steven M. Van Belleghem @.>; Comment @.> Subject: Re: [StevenVB12/patternize] Error in abind::abind(landmarksArray, landmarksArray1, along = 3) (Issue #34)

Hello, Steven. First, thanks for developing this package. I am excited to try it out for several projects. Someone I am teaching with introduced it to our students, and unfortunately we encountered this error too. so I am trying to sort it out. I've made sure we're all using the latest GitHub versions of patternize, raster, abind, etc. However, we all get the same error referencing abind.

I tried implementing the fixhttps://github.com/StevenVB12/patternize/commit/bcb0f02055f9bafd24b67b0143e3fe0d902b6b33 noted above manually and then assigning the modified function to the patternize namespace. However, this led to another issue

Error in x$.self$finalize() : attempt to apply non-function

In addition: Warning messages:

1: [rast] unknown extent

2: [rast] unknown extent

3: [rast] unknown extent

Error in h(simpleError(msg, call)) :

error in evaluating the argument 'x' in selecting a method for function 'extent': incorrect number of dimensions

So I've reached the end of what I think I can try. Any advice?

— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/34#issuecomment-1383238367, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC4Y3KLP6XAXHFTFV753WSRJXBANCNFSM6AAAAAAQNR67GA. You are receiving this because you commented.Message ID: @.**@.>>