datapane / datapane

Build and share data reports in 100% Python

Home Page:https://datapane.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Upload is not working

michelmetran opened this issue · comments

Is there an existing issue for this?

  • I have searched for similar issues and discussions

Bug Description

I made a simple example, which reads a .csv file and plots a graph. There is a control to select which table variable will be displayed.

When using the function dp.serve_app(report) the report appears normally...

But if I try to upload it gives error:

Configuring datapane logging in library mode
[23:39:54] [DEBUG] No plotapi found
Uploading report and associated data - *please wait...*
[23:39:54] [DEBUG] <View version="1" fragment="false">
  <Text><![CDATA[# Tesouro Direto]]></Text>
  <Group columns="1" valign="top">
    <Compute function_id="app.1475775833056" trigger="submit" swap="inner" target="id-GZniGeqGKVI" submit_label="Go">
      <Controls>
        <Choice name="title" label="Escolha um Título do Tesouro" required="true" options="[&quot;Tesouro IGPM+ com Juros Semestrais (Venc. em 01.01.2031)&quot;, &quot;Tesouro IPCA+ (Venc. em 15.05.2029)&quot;, &quot;Tesouro IPCA+ (Venc. em 15.05.2035)&quot;, &quot;Tesouro IPCA+ (Venc. em 15.05.2045)&quot;, &quot;Tesouro IPCA+ (Venc. em 15.08.2024)&quot;, &quot;Tesouro IPCA+ (Venc. em 15.08.2026)&quot;, &quot;Tesouro IPCA+ com Juros Semestrais (Venc. em 15.05.2035)&quot;, &quot;Tesouro IPCA+ com Juros Semestrais (Venc. em 15.05.2045)&quot;, &quot;Tesouro IPCA+ com Juros Semestrais (Venc. em 15.05.2055)&quot;, &quot;Tesouro IPCA+ com Juros Semestrais (Venc. em 15.08.2024)&quot;, &quot;Tesouro IPCA+ com Juros Semestrais (Venc. em 15.08.2026)&quot;, &quot;Tesouro IPCA+ com Juros Semestrais (Venc. em 15.08.2030)&quot;, &quot;Tesouro IPCA+ com Juros Semestrais (Venc. em 15.08.2032)&quot;, &quot;Tesouro IPCA+ com Juros Semestrais (Venc. em 15.08.2040)&quot;, &quot;Tesouro IPCA+ com Juros Semestrais (Venc. em 15.08.2050)&quot;, &quot;Tesouro Prefixado (Venc. em 01.01.2025)&quot;, &quot;Tesouro Prefixado (Venc. em 01.01.2026)&quot;, &quot;Tesouro Prefixado (Venc. em 01.01.2029)&quot;, &quot;Tesouro Prefixado (Venc. em 01.07.2024)&quot;, &quot;Tesouro Prefixado com Juros Semestrais (Venc. em 01.01.2025)&quot;, &quot;Tesouro Prefixado com Juros Semestrais (Venc. em 01.01.2027)&quot;, &quot;Tesouro Prefixado com Juros Semestrais (Venc. em 01.01.2029)&quot;, &quot;Tesouro Prefixado com Juros Semestrais (Venc. em 01.01.2031)&quot;, &quot;Tesouro Prefixado com Juros Semestrais (Venc. em 01.01.2033)&quot;, &quot;Tesouro Renda+ Aposentadoria Extra (Venc. em 15.12.2049)&quot;, &quot;Tesouro Renda+ Aposentadoria Extra (Venc. em 15.12.2054)&quot;, &quot;Tesouro Renda+ Aposentadoria Extra (Venc. em 15.12.2059)&quot;, &quot;Tesouro Renda+ Aposentadoria Extra (Venc. em 15.12.2064)&quot;, &quot;Tesouro Renda+ Aposentadoria Extra (Venc. em 15.12.2069)&quot;, &quot;Tesouro Renda+ Aposentadoria Extra (Venc. em 15.12.2074)&quot;, &quot;Tesouro Renda+ Aposentadoria Extra (Venc. em 15.12.2079)&quot;, &quot;Tesouro Renda+ Aposentadoria Extra (Venc. em 15.12.2084)&quot;, &quot;Tesouro Selic (Venc. em 01.03.2025)&quot;, &quot;Tesouro Selic (Venc. em 01.03.2026)&quot;, &quot;Tesouro Selic (Venc. em 01.03.2027)&quot;, &quot;Tesouro Selic (Venc. em 01.03.2029)&quot;, &quot;Tesouro Selic (Venc. em 01.09.2024)&quot;]"/>
      </Controls>
    </Compute>
    <Group name="id-GZniGeqGKVI" columns="1" valign="top">
      <Empty name="id-o18d7m3xYZw"/>
    </Group>
  </Group>
</View>

Traceback (most recent call last):
  File "d:\Codes\open_cash\tesouro_direto\scripts\02_datapane.py", line 60, in <module>
    dp.upload_report(blocks=report, name='Tesouro Direto', overwrite=True)
  File "C:\Users\michel\miniconda3\envs\pablocarreira-lastest\lib\site-packages\datapane\processors\api.py", line 191, in upload_report
    Pipeline(s).pipe(PreProcessView(is_finalised=True)).pipe(ConvertXML()).pipe(PreUploadProcessor()).result
  File "C:\Users\michel\miniconda3\envs\pablocarreira-lastest\lib\site-packages\datapane\processors\types.py", line 60, in pipe
    y = p.__call__(self._x)  # need to call as positional args
  File "C:\Users\michel\miniconda3\envs\pablocarreira-lastest\lib\site-packages\datapane\processors\processors.py", line 134, in __call__
    raise InvalidReportError(
datapane.client.exceptions.InvalidReportError: Reports with compute blocks can't currently be uploaded, please use dp.serve_app to serve as an app locally
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

I couldn't understand if the upload also uploads the data, in addition to the panel, or if I need to "serve" the data through a DB (probable).

Or else, I already suspected the size of my .csv file (10 mb...)
Any suggestion!?

System Information

- Datapane version: 0.16.4
- Python version: 3.10
- Operating System: Win 11
- Using Jupyter: No
- Pip or Conda: Pip
- Dependencies:
  - pandas: 1.5.3

Hi there,

Sorry for the delay! The apps functionality is still under development and can only be used when developing locally. Any reports with any apps blocks in them can not currently be uploaded to our Cloud instance, instead you need to use dp.serve_app(...). Thanks!