Open laziob opened 6 years ago
See #81 for some more details, but in short, you want simplify=FALSE
for now and do some postprocessing.
Haha Im the author of #81, a begginer to R and shiny so sorry for this type of questions :( I tried using simplify = FALSE and still get the same error though.
Ah, sorry, I totally missed you are the author of both tickets :) Let me try to clarify this with some additional docs and suggested workaround -- later this week.
Thank you very much! Looking foward to it. If somehow I come up to a solution I'll keep you posted.
Just a headsup, the issue appears to be located on the do.call(rbind, res) of the fbad_list_ads function
Warning: non-unique values when setting 'row.names': ‘1’, ‘2’, ‘3’, ‘4’
Warning: Error in row.names<-.data.frame: duplicate 'row.names' are not allowed
Stack trace (innermost first):
75: row.names<-.data.frame
74: row.names<-
73: rownames<-
72: rbind
71:
Hm, probably the simplify = FALSE
option is handled correctly only if length(id) == 1
when using fbad_list_ads
.. .can you please double check? If that's the case, then I think it's an easy fix in the package -- I was not actively using the batch feature of this function.
Exactly, when running fbad_list_ad with just 1 id, the simplify = FALSE
works, but when running with vector, as example:
adlisttest2 <- fbad_list_ad(id = c("23842697638530776", "23842658373930776", "23842658373830776"), statuses = "ACTIVE", fields = c("campaign_id", "adset_id", "name", "creative"), simplify = FALSE)
it returns the Error in row.names<-.data.frame
(*tmp*
, value = value) :
duplicate 'row.names' are not allowed
I tried modifying it locally on the package code to see if I could find a fix but had no luck due to lack of deeper knowledge 😢
Im using the fbad_list_ad function to get the active ads of a list of adsets ids, but for some reason I get an error of duplicate rownames. This only happens when getting the ads of different adsets at the same time.
testads <- fbad_list_ad(id = c("23842658373830776","23842658373930776","23842697638530776"), statuses = "ACTIVE", fields = c("campaign_id", "adset_id", "name", "creative")) Error in
row.names<-.data.frame
(*tmp*
, value = value) : duplicate 'row.names' are not allowed In addition: Warning message: non-unique values when setting 'row.names': ‘1’, ‘2’Any idea on how to solve it? Thanks and sorry for the trouble!