Skip to content

fix: link the fits, could not convert string to float. #273

@ycexiao

Description

@ycexiao

Problem

Follow the instructions in the manual section 3.3.1, page 25.
"In the “Parameters” panel, select the entire “Initial” column. Type “=Fit 1” and then
press “Enter"

Image

Traceback (most recent call last):
  File "/home/yuchen/Documents/diffpy.pdfgui/src/diffpy/pdfgui/gui/errorwrapper.py", line 61, in _f
    return func(*args, **kwargs)
  File "/home/yuchen/Documents/diffpy.pdfgui/src/diffpy/pdfgui/gui/parameterspanel.py", line 253, in applyCellChange
    self.grid_parameters.SetCellValue(row, 0, str(float(value)))
                                                  ~~~~~^^^^^^^
ValueError: could not convert string to float: '=Fit 1'

The error is shown, but the program succeed to link the parameters from "Fit 1".

Proposed solution

Add a condition to distinguish string and float.

Metadata

Metadata

Assignees

No one assigned

    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