Closed Alexander-Turubara closed 4 years ago
Confirm! I have the same error.
Hi @Alexander-Turubara, @jenccnej
Thank you for using the package!
I guess, there is something wrong with the relative file path of the authentication object. The best practice is to run your code inside an RStudio project or at least set a working directory for your project before you run any code.
Please do not use absolute paths like path = "C:/Users/myfile.bingauth"
in your example. Instead, set a relative file path that refers to the working directory of your project.
It is really difficult to troubleshoot your issue from remote. I develop the package on a mac os and unix system. I assume you are both on a Windows machine, right?
This code just runs fine for me:
bing_auth <- authenticate(save = T,
path = ".bingauth",
gitignore = T)
data <- load_bing_data(bing_auth = bing_auth,
account_id = "*******",
report = "CampaignPerformanceReport",
columns = c("AccountName", "CampaignName", "TimePeriod", "Impressions", "Clicks", "Spend", "Conversions"),
start = "2019-01-01",
end = "2019-01-02")
How does the bing_auth
object look like? Is is a dataframe containing an access and refresh token?
Thanks for your help, I really appreciate it.
Authentication went fine and bing_auth
object has access and refresh token. I've changed the file path as you mentioned and set a working directory also before ran any code.
Yes, I use a Windows machine.
Here is the code I use but I still can see the error:
bing_auth <- authenticate(save = T,
path = ".bingauth",
gitignore = T)
data <- load_bing_data(bing_auth = bing_auth,
account_id = "*******",
report = "CampaignPerformanceReport",
columns = c("AccountName", "CampaignName",
"Impressions",
"Clicks", "Spend"),
start = "2019-11-01",
end = "2019-11-30")
---------------------------------------------------------------------
`Error: XML content does not seem to be XML: ''`
Here is what I have in the bing auth object.
I figured out the problem Wrong account id And I passed the account number
Thanks anyway for your package!
@jenccnej Does it work for you? Can you pull data from the Bing Ads API?
@Alexander-Turubara Maybe you pass the wrong ID in the load_bing_data
function?
@jenccnej I've changed account_id
and everything works. Thank you both for the help
@jburkhardt Thanks for your package, it is really helpfull
Hello, Johannes. I faced the error while using your repository, can you help me how to avoid or fix this issue? I attach all the code I used: