[Bug]: Report upload errror
anu-kuncheria opened this issue · comments
Is there an existing issue for this?
- I have searched for similar issues and discussions
Bug Description
I used dp.upload_report() to upload a report. It was fine until yesterday, but today, it is throwing me the below error. The dp.View uses Group and HTML. Within Group I have Media and Table.
raise DPClientError(msg)
datapane.client.exceptions.DPClientError: Group has less than 1 objects
I tried running the upload_report with only one piece of HTML in dp.View and it is working. But with other elements, it is throwing the error.
System Information
- Datapane version: 0.16.2
- Python version:Python 2.7.16
- Operating System: Mac
- Using Jupyter: No
- Pip or Conda: pip
- Dependencies:
- pandas:
- ...
Anything else?
Full stack trace
Configuring datapane logging in library mode
[22:10:36] [DEBUG] No Bokeh Found
Uploading report and associated data - please wait...
Traceback (most recent call last):
File "/Users/akuncheria/Documents/GSR-2021Feb/UCBerkeley_GSR/city-factsheet/city-factsheet-sanfranciscobayarea/results/../scripts/report.py", line 101, in
report()
File "/Users/akuncheria/Documents/GSR-2021Feb/UCBerkeley_GSR/city-factsheet/city-factsheet-sanfranciscobayarea/results/../scripts/report.py", line 96, in report
dp.upload_report(report_content, name=f'Smart Cities Research Center: {city_name_report}',
File "/usr/local/lib/python3.11/site-packages/datapane/processors/api.py", line 191, in upload_report
Pipeline(s).pipe(PreProcessView(is_finalised=True)).pipe(ConvertXML()).pipe(PreUploadProcessor()).result
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/datapane/processors/types.py", line 60, in pipe
y = p.call(self._x) # need to call as positional args
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/datapane/processors/processors.py", line 60, in call
v.accept(pp)
File "/usr/local/lib/python3.11/site-packages/datapane/blocks/base.py", line 84, in accept
visitor.visit(self)
File "/usr/local/lib/python3.11/site-packages/multimethod/init.py", line 315, in call
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/datapane/view/visitors.py", line 121, in visit
_ = b.traverse(self)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/datapane/blocks/layout.py", line 70, in traverse
return reduce(lambda _visitor, block: block.accept(_visitor), self.blocks, visitor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/datapane/blocks/layout.py", line 70, in
return reduce(lambda _visitor, block: block.accept(_visitor), self.blocks, visitor)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/datapane/blocks/base.py", line 84, in accept
visitor.visit(self)
File "/usr/local/lib/python3.11/site-packages/multimethod/init.py", line 315, in call
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/datapane/view/visitors.py", line 115, in visit
raise DPClientError(msg)
datapane.client.exceptions.DPClientError: Group has less than 1 objects
Please run with dp.enable_logging()
, restart your Jupyter kernel/Python instance, and/or visit https://www.github.com/datapane/datapane to raise issue / discuss if error repeats
The issue was with the Group block and it got resolved when I fixed the parameters inside.