Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV Files with header crash pyfda #172

Open
chipmuenk opened this issue Apr 7, 2020 · 1 comment
Open

CSV Files with header crash pyfda #172

chipmuenk opened this issue Apr 7, 2020 · 1 comment
Labels
CSV related to reading / writing CSV files

Comments

@chipmuenk
Copy link
Owner

chipmuenk commented Apr 7, 2020

When trying to import a CSV file with a header inspite of setting Header = Off, the following warning occurs:

[WARNING] [pyfda.libs.pyfda_fix_lib:804] Can't convert coefficient_set_1: could not convert string to complex: 'coefficient_set_1'

The values are imported correctly to the table but the first row contains a zero. When copying the table to the internal dict, pyfda crashes with

Traceback (most recent call last):
    File "d:\daten\design\python\git\pyfda\pyfda\libs\pyfda_lib.py", line 1465, in fil_convert
    zpk = sig.tf2zpk(b,a)
    File "C:\Users\Chris\Anaconda3\lib\site-packages\scipy\signal\filter_design.py", line 1069, in tf2zpk
     z = roots(b)
     ...
    File "C:\Users\Chris\Anaconda3\lib\site-packages\numpy\linalg\linalg.py", line 218, in _assert_finite
   raise LinAlgError("Array must not contain infs or NaNs")

This exception is not caught:

Traceback (most recent call last):
   File "d:\daten\design\python\git\pyfda\pyfda\input_widgets\input_coeffs.py", line 773, in _save_dict
     fil_save(fb.fil[0], self.ba, 'ba', __name__)
   File "d:\daten\design\python\git\pyfda\pyfda\libs\pyfda_lib.py", line 1382, in fil_save
      fil_convert(fil_dict, format_in)
   File "d:\daten\design\python\git\pyfda\pyfda\libs\pyfda_lib.py", line 1469, in fil_convert
      raise ValueError(e)
   ValueError: Array must not contain infs or NaNs
@chipmuenk chipmuenk added the CSV related to reading / writing CSV files label Apr 7, 2020
@chipmuenk
Copy link
Owner Author

The software no longer crashes, however, data in row format with headers still cannot be read. Headers in column format can be suppressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSV related to reading / writing CSV files
Projects
None yet
Development

No branches or pull requests

1 participant