Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

Idle timeout expected as int, but is float #97

Closed
agross opened this issue Jun 12, 2019 · 3 comments
Closed

Idle timeout expected as int, but is float #97

agross opened this issue Jun 12, 2019 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@agross
Copy link

agross commented Jun 12, 2019

Trying to render this cast file:

{"version": 2, "width": 138, "height": 44, "timestamp": 1560322449, "idle_time_limit": 1.0, "env": {"SHELL": "/usr/local/bin/zsh", "TERM": "xterm-256color"}}

raises this error:

Rendering started
Traceback (most recent call last):
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/asciicast.py", line 89, in read_records
    yield AsciiCastV2Record.from_json_line(line)
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/asciicast.py", line 34, in from_json_line
    return AsciiCastV2Header.from_json_line(line)
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/asciicast.py", line 183, in from_json_line
    header = cls(**filtered_attributes)
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/asciicast.py", line 159, in __new__
    .format(attr_name, type(attr), cls.types[attr_name]))
termtosvg.asciicast.AsciiCastError: Invalid type for attribute idle_time_limit: <class 'float'> (expected one of (<class 'NoneType'>, <class 'int'>))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/asciicast.py", line 49, in _read_v1_records
    json_dict = json.loads(data)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 158)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/termtosvg", line 6, in <module>
    termtosvg.main.main()
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/main.py", line 286, in main
    args.min_frame_duration, args.max_frame_duration)
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/main.py", line 207, in render_subcommand
    template=template)
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/anim.py", line 145, in render_animation
    cell_height)
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/anim.py", line 167, in _render_preparation
    header = next(records)
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/term.py", line 296, in screen_events
    header = next(records)
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/asciicast.py", line 92, in read_records
    yield from _read_v1_records(cast_file.read())
  File "/usr/local/Cellar/termtosvg/0.8.0/libexec/lib/python3.7/site-packages/termtosvg/asciicast.py", line 51, in _read_v1_records
    raise AsciiCastError from exc
termtosvg.asciicast.AsciiCastError
$ asciinema --version
asciinema 2.0.2

termtosvg from Homebrew

@nbedos nbedos closed this as completed in 1980275 Jun 14, 2019
@nbedos nbedos reopened this Jun 14, 2019
@nbedos
Copy link
Owner

nbedos commented Jun 14, 2019

Yep, my bad! It should be fixed by 1980275.

@nbedos nbedos added the bug Something isn't working label Jun 14, 2019
@agross
Copy link
Author

agross commented Jun 15, 2019

Thanks! 👍 Eagerly awaiting a Homebrew update ;-)

@nbedos nbedos added this to the 0.9.0 milestone Jun 30, 2019
@nbedos
Copy link
Owner

nbedos commented Jul 6, 2019

@nbedos nbedos closed this as completed Jul 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants