cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
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.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group