Skip to content

Key Error: mode when running either austin2speedscope or austin2pprof on windows 10  #16

Description

@skewballfox

Description

upon running either austin2speedcope.exe input.austin output.speedscope or austin2pprof.exe input.austin output.pprof I run into the following error:

  File "<pythonpath>\LocalCache\local-packages\Python310\site-packages\austin\format\speedscope.py", line 212, in main
    mode = fin.metadata["mode"]
KeyError: 'mode'

Steps to Reproduce

  1. generate a austin profile via austin -P .\.venv\Scripts\python.exe launch.py 1>wall_time.austin
  2. run either command to convert the file to another format

Expected behavior: [What you expect to happen]

conversion happens and new file is created
Actual behavior: [What actually happens]
command errors out with a stacktrace ending in the above message

Reproduces how often: [What percentage of the time does it reproduce?]
100%

Versions

PS > austin --version
austin 3.5.0
PS > austin2pprof.exe --version
0.1.0
PS > austin-compress.exe --version
0.2.0
PS > austin2speedscope.exe --version
0.2.1
PS > python --version
Python 3.10.10

this is on windows 10

Additional Information

this seems related to the Metadata class inside stats.py.
mode is one of the metadata fields listed at the top of the austin output file (in the output from the command in the steps to reproduce the line reads # mode: wall

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