Comprehend #ERRORS in IMPORTFROMWEB()

Install this add-on for Free from the G Suite Marketplace

At the request level

#QUOTA_REACHED

Right now IMPORTFROMWEB allows up to 500 requests every 6 hours.
In case you reach your maximum quota, please just retry later.

We are aware that it is a strong limitation and we we want to break it very soon. However it is the price to pay to being able to serve all the users right now.

RESULTS_EMPTY

The function has managed to reach the website but it didn’t find results for the XPaths filled.

This error can appear if the target website displays a different page to the one you see in your browser, due to different parameters like location or Captcha handling.
You can debug these cases by using the following options:

  • takeScreenshot = TRUE
  • saveSourceCode = TRUE

These two options will save a screenshot and/or the source code of the page as seen by IMPORTFROMWEB.

To retrieve the screenshots and source codes of the urls, call IMPORTFROMWEB_getMeta(reference_to_an_IMPORTFROMWEB_function)

#TIMEDOUT

Sometimes, a request can remain stuck and not return the page results, the same way as when one load a url in the browser and the loading bar keeps hung.
In general, try again later.

In case you call a lot of urls in the same page, a timeout can also happen as the requests get queued. Then try to limit the number of requests you’re sending at once.

#URL_NOT_VALID

#URL_NOT_VALID means that the url filled doesn’t have a valid structure. Urls should usually come with their protocol (https:// or http://)

#OTHER_REQUEST_ERROR

This error regroups errors that have not been handled in previous cases

At selector level

#REGEX_RETURNS_NULL

It seems that the XPath returned results but didn’t comply with the regex rules.
In order to debug it, try to remove the regex rules and test the result on your regular expression using https://regexr.com/ (for example)

#XPATH_RETURNS_NULL

It seems that the function didn’t find an element corresponding to the XPath filled.

This error can appear if the target website displays a different page to the one you see in your browser, due to different parameters like location or Captcha handling.
You can debug these cases by using the following options:

  • takeScreenshot = TRUE
  • saveSourceCode = TRUE

These two options will save a screenshot and/or the source code of the page as seen by IMPORTFROMWEB.

To retrieve the screenshots and source codes of the urls, call IMPORTFROMWEB_getMeta(reference_to_an_IMPORTFROMWEB_function)

#REQUEST_RETURNS_403

According to Wikipedia:
“HTTP 403 is a standard HTTP status code communicated to clients by an HTTP server to indicate that access to the requested (valid) URL by the client is Forbidden for some reason”

Usually, it means that the target website does not want to allow IMPORTFROMWEB to scrape its data.
We will come up with solutions for that in the future.

#XPATH_NOT_VALID

The XPath filled is not a valid XPath.
In order to create your XPath we recommend you to have a look at our tutorial:
Find an XPath with little HTML knowledge

#OTHER_ERROR