locationtech / rasterframes

Geospatial Raster support for Spark DataFrames
http://rasterframes.io
Apache License 2.0
243 stars 46 forks source link

Docs build broken due to AttributeError: SparkSession has no _conf #470

Closed vpipkt closed 4 years ago

vpipkt commented 4 years ago

We are getting broken docs build in CI due to the following error calling basically the pretty markdown printer for DataFrame. The error is printed before the successful rendering of the table. Not sure what to make of that.

---------------------------------------------------------------------------AttributeError
Traceback (most recent call last)~/src/raster-
frames/.venv_p376/lib/python3.7/site-
packages/IPython/core/formatters.py in __call__(self, obj)
    700                 type_pprinters=self.type_printers,
    701                 deferred_pprinters=self.deferred_printers)
--> 702             printer.pretty(obj)
    703             printer.flush()
    704             return stream.getvalue()
~/src/raster-frames/.venv_p376/lib/python3.7/site-
packages/IPython/lib/pretty.py in pretty(self, obj)
    398                         if cls is not object \
    399                                 and
callable(cls.__dict__.get('__repr__')):
--> 400                             return _repr_pprint(obj, self,
cycle)
    401
    402             return _default_pprint(obj, self, cycle)
~/src/raster-frames/.venv_p376/lib/python3.7/site-
packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
    693     """A pprint that just redirects to the normal repr
function."""
    694     # Find newlines and replace them with p.break_()
--> 695     output = repr(obj)
    696     for idx,output_line in enumerate(output.splitlines()):
    697         if idx:
~/src/raster-frames/.venv_p376/lib/python3.7/site-
packages/pyspark/sql/dataframe.py in __repr__(self)
    383
    384     def __repr__(self):
--> 385         if not self._support_repr_html and
self.sql_ctx._conf.isReplEagerEvalEnabled():
    386             vertical = False
    387             return self._jdf.showString(
AttributeError: 'SparkSession' object has no attribute '_conf'

Showing only top 5 rows.

landsat modis crs extent

[rest of output displays something reasonable]



I used the attached script to `git bisect` and determine that https://github.com/locationtech/rasterframes/commit/6d7d58c18c3132bc94b463944c80ffdc1be42295 introduces this error