Skip to content

DMD template is in incorrect format and causes JSONDecoder exception. #243

@rasjani

Description

@rasjani

https://github.com/winedarksea/AutoTS/blame/7a843d050f62c1b4046c0b08020838e8eb95388a/autots/templates/general.py#L467

when running following:

from autots import AutoTS
model = AutoTS(forecast_length=10, frequency='infer',ensemble='simple', drop_data_older_than_periods=200)

following backtrace is thrown:

Traceback (most recent call last):
  File "/Users/rasjani/src/omat/tmp/tst.py", line 2, in <module>
    model = AutoTS(forecast_length=10, frequency='infer',ensemble='simple', drop_data_older_than_periods=200)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rasjani/src/omat/tmp/venv/lib/python3.11/site-packages/autots/evaluator/auto_ts.py", line 392, in __init__
    full_params = json.loads(row['TransformationParameters'])
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 4 (char 3)

Root cause:

value stored to TransformationParameters is not valid json..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions