Skip to content

lineprofiler.results not created if script didn't finish #89

@skjerns

Description

@skjerns

On a new install using Anaconda and Spyder 5.4.3 I get the following error when the script did not completely run (i.e. if the run was cancelled). Before, this still created an output.

Traceback (most recent call last):
  File "/home/skjerns/anaconda3/lib/python3.11/site-packages/spyder_line_profiler/spyder/widgets.py", line 489, in finished
    self.show_data(justanalyzed=True)
  File "/home/skjerns/anaconda3/lib/python3.11/site-packages/spyder_line_profiler/spyder/widgets.py", line 526, in show_data
    self.datatree.load_data(self.DATAPATH)
  File "/home/skjerns/anaconda3/lib/python3.11/site-packages/spyder_line_profiler/spyder/widgets.py", line 609, in load_data
    with open(profdatafile, 'rb') as fid:
         ^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/skjerns/.config/spyder-py3/lineprofiler.results'

Anyone know how I can revert to the behaviour that even code that didn't finish produces some profile output?

kernprof==4.1.1
spyder-line-profiler==0.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions