Skip to content

Input data selection error in jupyter notebook #18

@polaya07

Description

@polaya07

When running the main jupyter notebook, there are two issues:

  1. The input data selection cell throws and error:
%cd $note_START
display(sm_widg)
print('Insert the name of the Covariates')
display(cov_widg)
reg_acc = region_widget(reg_type_acc)

Error

%cd $note_START

display(sm_widg)

print('Insert the name of the Covariates')

display(cov_widg)

reg_acc = region_widget(reg_type_acc)

/home/jovyan/work/SOMOSPIE

BoundedIntText(value=2017, description='Which year do you want to use?', max=2017, min=2017)

Insert the name of the Covariates

Accordion(children=(VBox(children=(HBox(children=(Checkbox(value=True), Label(value='CONUS_DEM1km'))), HBox(ch…

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[18], line 5
      3 print('Insert the name of the Covariates')
      4 display(cov_widg)
----> 5 reg_acc = region_widget(reg_type_acc)

File ~/work/SOMOSPIE/code/workflow_jupyter-notebook/utils.py:641, in region_widget(reg_type_acc)
    638 # Of the VBoxes within the accordion that have a list of Checkbox options, 
    639 #  check the first of the first by default.
    640 for i in range(len(reg_acc.children)):
--> 641     if reg_acc._titles[str(i)]!="BOX":
    642         reg_acc.children[i].children[0].children[0].value = True
    643         break

AttributeError: 'Accordion' object has no attribute '_titles'
  1. When the default soil moisture data is already downloaded, cell 5 in the notebook fails.
%cd $note_START
sm_widg = SoilMoistureData(sm_widgets)

Perhaps a solution is to get a nicer message message in that download function so people don't think that it's failing.

This is the container environment I'm running in:
Container: https://hub.docker.com/r/globalcomputinglab/somospie

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions