cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Databricks notebooks and 'requests' python library. Incosistent output.

rustem17
New Contributor II

I have a strange issue with Databricks notebooks and Google Colab notebooks, where I cannot get the results from requests library that would be consistent to what I get on my local computer. Dir Surveys (wyo.gov) ("http://pipeline.wyo.gov/r_Directionalapi.cfm?nApi=3531199") as an example. If you try to execute on your local computer and count the length of requests.get(url="").text, you get 5831 or something like that. But when you execute the same code on Databricks notebook, you get the length equal to 3747 or around that number. What could be the issue?

1 REPLY 1

rustem17
New Contributor II

Additional information: when I download html file from the above mentioned website, I still get not the same html page as I get from the same code that I run on my computer or any other computer. The size of downloaded html file is the same as I get when I execute requests.get() code in both environments, for computer it is 5xxx bytes and on Databricks it is 3xxx bytes.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now