AutoTS icon indicating copy to clipboard operation
AutoTS copied to clipboard

DMD template is in incorrect format and causes JSONDecoder exception.

Open rasjani opened this issue 9 months ago • 4 comments

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..

rasjani avatar May 13 '24 07:05 rasjani