Error in UseMethod("xmlChildren") :
Closed this issue · 15 comments
I am simply running the example code and getting the error below.
Error in UseMethod("xmlChildren") :
no applicable method for 'xmlChildren' applied to an object of class "NULL"
I also get the same error. It seems to occur randomly. Sometimes it works and sometimes it does not.
Hello
seems like a same error Error in UseMethod("xmlChildren"): no applicable method for 'xmlChildren' applied to an object of class "NULL", I started using the function and suddenly it stoped and start sending this even with the documentation samples same result.. Hopefully we can have a workaround to solve it. thank You!
Hello Guys I found a solve for this, I requested a google key for Google Maps Distance Matrix include it in my code as documentation said and now looks like it's working :-)
I somehow managed to fix it I think. I had to get a different API key. I am guessing this error might have something to do with the API key.
I was receiving this message as well. In my case, I think it was a # character in an origin or destination.
I have been playing around with this package as well. I can confirm it is an error that pops up randomly. I do not know the reason why. Why do I know that it is random? Because I tested to loop over predefined queries. The loop breaks at different places. When I move the starting point of the loop, it runs flawlessly over the segment where it broke before.
@S-UP Thanks for your comment. I also think this error is generated at random, although for some reason more likely to occur in Windows machines. Any further feedback would be appreciated.
I can confirm I am running this on a Windows machine. But this issue is seriously annoying as my loop always breaks at random spots. This basically makes the package useless to many people. Happy to test certain things if somebody can give guidance on what the cause of this error is.
Here some additional info: I have tried the googleway package. Run into a different error early on telling me that the server could not be reached. Implemented an error handling statement and seems to work fine. Potentially, above error is also related to situations when the server cannot be reached.
This happens when you provide a strange location, for which the API returns nothing. Can you please provide a reproducible example?
@cyzhu that's not the issue that was described by OP, please don't post it here.
Your problem is different, and was investigated in #32 and #31. The patch is already released and you just have to install the github version instead of CRAN one.
On the sidenote: I guess it's the gmaps-API bug that they sometimes don't provide "duration_in_traffic" so that the old version works for some routes.
@Demetrio92 Got it. I'll remove my above post. Thanks for the advice.
@Demetrio92 Tried github version but doesn't work. I still get the xmlChildren problem. I'm guessing my problem might not be the same as what you refered earlier because I'm getting the different errors. Do you have any other suggestions?
Thanks!
@cyzhu
I am sorry, I didn't get exactly what was the issue and assumed the usual. Maybe your post was actually on topic, and you shouldn't have deleted it.
So.
Is the error the same as for OP? Then repost your example + error.
If the error is different, open a new issue.
Unfortunately "Error in xmlChlidren" is not descriptive enough, as there can be many reasons leading to the failure of that function. R usually provides the full traceback, and you should always add all of it to your bug reports.
I'll close the issue, as no one is yet able to provide a reproducible example. Please open a new one, if you have the same issue.